Commit 49a2cf8f authored by David Lawrence's avatar David Lawrence

quiet va_start() warnings on BSD/OS 4.1

parent a5ed46c9
......@@ -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__ */
......@@ -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
......
#! /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
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment