quiet va_start() warnings on BSD/OS 4.1
This commit is contained in:
18
acconfig.h
18
acconfig.h
@@ -62,3 +62,21 @@
|
||||
struct __sFILE;
|
||||
extern __inline int __sputaux(int _c, struct __sFILE *_p);
|
||||
#endif
|
||||
|
||||
/* Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
|
||||
#undef SHUTUP_STDARG_CAST
|
||||
#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__)
|
||||
#include <stdarg.h> /* Grr. Must be included *every time*. */
|
||||
/*
|
||||
* The silly continuation line is to keep configure from
|
||||
* commenting out the #undef.
|
||||
*/
|
||||
#undef \
|
||||
va_start
|
||||
#define va_start(ap, last) \
|
||||
do { \
|
||||
union { const void *konst; long *var; } _u; \
|
||||
_u.konst = &(last); \
|
||||
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
|
||||
} while (0)
|
||||
#endif /* SHUTUP_STDARG_CAST && __GNUC__ */
|
||||
|
||||
18
config.h.in
18
config.h.in
@@ -70,6 +70,24 @@ struct __sFILE;
|
||||
extern __inline int __sputaux(int _c, struct __sFILE *_p);
|
||||
#endif
|
||||
|
||||
/* Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */
|
||||
#undef SHUTUP_STDARG_CAST
|
||||
#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__)
|
||||
#include <stdarg.h> /* Grr. Must be included *every time*. */
|
||||
/*
|
||||
* The silly continuation line is to keep configure from
|
||||
* commenting out the #undef.
|
||||
*/
|
||||
#undef \
|
||||
va_start
|
||||
#define va_start(ap, last) \
|
||||
do { \
|
||||
union { const void *konst; long *var; } _u; \
|
||||
_u.konst = &(last); \
|
||||
ap = (va_list)(_u.var + __va_words(__typeof(last))); \
|
||||
} while (0)
|
||||
#endif /* SHUTUP_STDARG_CAST && __GNUC__ */
|
||||
|
||||
/* Define if you have the <fcntl.h> header file. */
|
||||
#undef HAVE_FCNTL_H
|
||||
|
||||
|
||||
11
configure
vendored
11
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
# From configure.in Revision: 1.142
|
||||
# From configure.in Revision: 1.143
|
||||
|
||||
|
||||
|
||||
@@ -3876,6 +3876,15 @@ case "$host" in
|
||||
EOF
|
||||
|
||||
;;
|
||||
*-bsdi4.1*)
|
||||
#
|
||||
# Shut up a -Wcast-qual warning from va_start().
|
||||
#
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define SHUTUP_STDARG_CAST 1
|
||||
EOF
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
|
||||
@@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
|
||||
dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
dnl SOFTWARE.
|
||||
|
||||
AC_REVISION($Revision: 1.142 $)
|
||||
AC_REVISION($Revision: 1.143 $)
|
||||
|
||||
AC_PREREQ(2.13)
|
||||
|
||||
@@ -843,6 +843,12 @@ case "$host" in
|
||||
#
|
||||
AC_DEFINE(SHUTUP_SPUTAUX)
|
||||
;;
|
||||
*-bsdi4.1*)
|
||||
#
|
||||
# Shut up a -Wcast-qual warning from va_start().
|
||||
#
|
||||
AC_DEFINE(SHUTUP_STDARG_CAST)
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user