- Removed HAVE_VSNPRINTF
This commit is contained in:
parent
a1f80f108f
commit
597f394d46
6 changed files with 2 additions and 103 deletions
|
@ -188,8 +188,6 @@ check_function_exists(strnicmp HAVE_STRNICMP)
|
|||
check_function_exists(strsep HAVE_STRSEP)
|
||||
check_function_exists(strtoul HAVE_STRTOUL)
|
||||
check_function_exists(uname HAVE_UNAME)
|
||||
check_symbol_exists(vsnprintf "stdio.h" HAVE_VSNPRINTF)
|
||||
check_symbol_exists(_vsnprintf "stdio.h" HAVE__VSNPRINTF)
|
||||
check_function_exists(wait HAVE_WAIT)
|
||||
check_function_exists(waitpid HAVE_WAITPID)
|
||||
|
||||
|
|
|
@ -97,8 +97,6 @@
|
|||
#cmakedefine HAVE_SETITIMER
|
||||
#cmakedefine HAVE_EPOLL_CREATE
|
||||
#cmakedefine HAVE_GETRLIMIT
|
||||
#cmakedefine HAVE_VSNPRINTF
|
||||
#cmakedefine HAVE__VSNPRINTF
|
||||
#cmakedefine HAVE_SETPGRP
|
||||
#cmakedefine HAVE_MAKE_UNIQUE
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#endif
|
||||
|
||||
#include "compat/psock.h"
|
||||
#include "compat/vsnprintf.h"
|
||||
#include "compat/termios.h"
|
||||
#include "compat/strcasecmp.h"
|
||||
#include "common/field_sizes.h"
|
||||
|
@ -699,7 +698,7 @@ namespace
|
|||
ansi_text_color_fore(color);
|
||||
|
||||
va_start(args, fmt);
|
||||
vsnprintf(buffer, 2048, fmt, args);
|
||||
std::vsnprintf(buffer, 2048, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
str_print_term(stdout, buffer, 0, 1);
|
||||
|
|
|
@ -5,5 +5,4 @@ add_library(compat
|
|||
rename.h send.h socket.h statmacros.h
|
||||
stdfileno.h strcasecmp.cpp strcasecmp.h strdup.cpp strdup.h
|
||||
strerror.cpp strerror.h strncasecmp.cpp strncasecmp.h strsep.cpp
|
||||
strsep.h strtoul.cpp strtoul.h termios.h uint.h uname.cpp uname.h
|
||||
vsnprintf.cpp vsnprintf.h)
|
||||
strsep.h strtoul.cpp strtoul.h termios.h uint.h uname.cpp uname.h)
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2004 Dizzy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#include "common/setup_before.h"
|
||||
#include "compat/vsnprintf.h"
|
||||
#include "common/setup_after.h"
|
||||
|
||||
#if !defined(HAVE_VSNPRINTF) && !defined(HAVE__VSNPRINTF)
|
||||
# if defined(HAVE_DOPRNT) && defined(_IOWRT) && defined(_IOSTRG)
|
||||
|
||||
namespace pvpgn
|
||||
{
|
||||
|
||||
extern int vsnprintf(char *str, int size, const char *format, va_list ap)
|
||||
{
|
||||
FILE b;
|
||||
int ret;
|
||||
#ifdef VMS
|
||||
b->_flag = _IOWRT | _IOSTRG;
|
||||
b->_ptr = str;
|
||||
b->_cnt = size;
|
||||
#else
|
||||
b._flag = _IOWRT | _IOSTRG;
|
||||
b._ptr = str;
|
||||
b._cnt = size;
|
||||
#endif
|
||||
ret = _doprnt(format, ap, &b);
|
||||
putc('\0', &b);
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# else
|
||||
# error "This program requires either vsnprintf(), _vsnprintf() or _doprnt()"
|
||||
# endif
|
||||
typedef int filenotempty; /* make ISO standard happy */
|
||||
#endif
|
|
@ -1,43 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2004 Dizzy
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
#ifndef INCLUDED_VSNPRINTF_PROTOS
|
||||
#define INCLUDED_VSNPRINTF_PROTOS
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#if !defined(HAVE_VSNPRINTF)
|
||||
#ifdef HAVE__VSNPRINTF
|
||||
#define vsnprintf(str,size,format,ap) _vsnprintf(str,size,format,ap)
|
||||
#else
|
||||
#if defined(_IOSTRG) && defined(_IOSTRG) && defined(HAVE_DOPRNT)
|
||||
|
||||
#include <cstdarg>
|
||||
|
||||
namespace pvpgn
|
||||
{
|
||||
|
||||
extern int vsnprintf(char *str, int size, const char *format, va_list ap);
|
||||
|
||||
}
|
||||
#else
|
||||
#error "Your system lacks ANY kind of vsnprintf support!"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* INCLUDED_VSNPRINTF_PROTOS */
|
Loading…
Reference in a new issue