mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
failed to build with gcc -Wall (esp. on Redhat like systems)
This commit is contained in:
parent
c8e1ef5286
commit
529b9ece6b
3 changed files with 12 additions and 4 deletions
5
CHANGES
5
CHANGES
|
@ -27,6 +27,11 @@ corrections:
|
|||
|
||||
minor corrections in doc (2x)
|
||||
|
||||
porting:
|
||||
building socat on systems that predefined the CFLAGS environment to
|
||||
contain -Wall failed (esp.RedHat). Thanks to Paul Wouters for reporting
|
||||
this problem and to Simon Matter for providing the patch
|
||||
|
||||
####################### V 2.0.0-b7:
|
||||
|
||||
security:
|
||||
|
|
5
compat.h
5
compat.h
|
@ -261,7 +261,10 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
/* might be checked in later versions */
|
||||
#if !defined(HAVE_BASIC_OFF_T) || !HAVE_BASIC_OFF_T
|
||||
# undef HAVE_BASIC_OFF_T
|
||||
# define HAVE_BASIC_OFF_T 5 /*long*/
|
||||
#endif
|
||||
#ifndef F_off
|
||||
# if HAVE_BASIC_OFF_T==3
|
||||
# define F_off "%d"
|
||||
|
|
|
@ -84,7 +84,7 @@ AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt))
|
|||
dnl Check for hstrerror prototype
|
||||
AC_MSG_CHECKING(for hstrerror prototype)
|
||||
AC_CACHE_VAL(sc_cv_have_prototype_hstrerror,
|
||||
[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $CFLAGS1";
|
||||
[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')";
|
||||
AC_TRY_COMPILE([#include <netdb.h>],[hstrerror();],
|
||||
[sc_cv_have_prototype_hstrerror=no],
|
||||
[sc_cv_have_prototype_hstrerror=yes]);
|
||||
|
@ -1312,7 +1312,7 @@ dnl output values: 1..short, 2..unsigned short, 3..int, 4..u-int,
|
|||
dnl 5..long, 6..u-long; others not yet supported
|
||||
define(AC_BASIC_TYPE,[
|
||||
AC_CACHE_CHECK(for equivalent simple type of $2, $4,
|
||||
[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $CFLAGS1"
|
||||
[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')"
|
||||
AC_TRY_COMPILE([$1],[$2 u; short v; &u==&v;],
|
||||
[$4="1 /* short */"],
|
||||
[AC_TRY_COMPILE([$1],[$2 u; unsigned short v; &u==&v;],
|
||||
|
@ -1344,7 +1344,7 @@ dnl arg4: output variable, values see AC_BASIC_TYPE
|
|||
dnl arg5: cache variable (might be constructed automatically)
|
||||
define(AC_TYPEOF_COMPONENT,[
|
||||
AC_CACHE_CHECK(for basic type of $2.$3, $5,
|
||||
[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $CFLAGS1"
|
||||
[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $(echo "$CFLAGS1" | sed -e 's@-Wall@@g')"
|
||||
AC_TRY_COMPILE([$1],[$2 u;short v; &u.$3==&v;],
|
||||
[$5="1 /* short */"],
|
||||
[AC_TRY_COMPILE([$1],[$2 u; unsigned short v; &u.$3==&v;],
|
||||
|
|
Loading…
Reference in a new issue