Changes to VT:
- fixed compiler warnings if using non-GNU compiler, respectively if _FORTIFY_SOURCE is 0 or not defined This commit was SVN r26016.
Этот коммит содержится в:
родитель
bc5886707f
Коммит
e59c5bb7bc
@ -10,8 +10,8 @@ AC_DEFUN([ACVT_IOWRAP],
|
||||
[
|
||||
sav_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
|
||||
|
||||
AC_CHECK_FUNCS([ \
|
||||
__fprintf_chk \
|
||||
creat64 \
|
||||
fopen64 \
|
||||
fseeko \
|
||||
@ -29,6 +29,15 @@ AC_DEFUN([ACVT_IOWRAP],
|
||||
fsync \
|
||||
fdatasync \
|
||||
lockf])
|
||||
|
||||
AC_CHECK_FUNCS([__fprintf_chk],
|
||||
[
|
||||
dnl Check whether <stdio.h> declares __vfprintf_chk. This should be the case if
|
||||
dnl _FORTIFY_SOURCE is defined (default when using the GNU compiler).
|
||||
dnl Otherwise, we have to declare this function to avoid compiler warnings.
|
||||
AC_CHECK_DECLS([__vfprintf_chk], [], [], [#include <stdio.h>])
|
||||
])
|
||||
|
||||
CPPFLAGS=$sav_CPPFLAGS
|
||||
|
||||
have_iowrap="yes"
|
||||
|
@ -1422,6 +1422,9 @@ int fscanf(FILE *stream, const char *format, ...)
|
||||
|
||||
|
||||
#if defined(HAVE___FPRINTF_CHK) && HAVE___FPRINTF_CHK
|
||||
#if !(defined(HAVE_DECL___VFPRINTF_CHK) && HAVE_DECL___VFPRINTF_CHK)
|
||||
extern int __vfprintf_chk(FILE *stream, int flag, const char *format, va_list ap);
|
||||
#endif /* HAVE_DECL___VFPRINTF_CHK */
|
||||
int __fprintf_chk(FILE *stream, int flag, const char *format, ...)
|
||||
#else /* HAVE___FPRINTF_CHK */
|
||||
int fprintf(FILE *stream, const char *format, ...)
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user