Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Use __GNUC_PREREQ__().



details:   https://anonhg.NetBSD.org/src/rev/1850d4e22ae7
branches:  trunk
changeset: 485766:1850d4e22ae7
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Fri May 05 00:20:22 2000 +0000

description:
Use __GNUC_PREREQ__().

diffstat:

 lib/libc/quad/quad.h            |  4 ++--
 sys/arch/i386/include/ansi.h    |  7 ++++---
 sys/arch/i386/include/stdarg.h  |  5 ++---
 sys/arch/i386/include/varargs.h |  7 +++----
 sys/lib/libkern/quad.h          |  4 ++--
 5 files changed, 13 insertions(+), 14 deletions(-)

diffs (111 lines):

diff -r b4a7152aa784 -r 1850d4e22ae7 lib/libc/quad/quad.h
--- a/lib/libc/quad/quad.h      Fri May 05 00:19:04 2000 +0000
+++ b/lib/libc/quad/quad.h      Fri May 05 00:20:22 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: quad.h,v 1.7 1999/05/03 15:39:47 christos Exp $        */
+/*     $NetBSD: quad.h,v 1.8 2000/05/05 00:20:58 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -107,7 +107,7 @@
  * as u_quad_t, while gcc 2 correctly uses int.  Unfortunately, we still use
  * both compilers.
  */
-#if (__GNUC__ >= 2) || defined(lint)
+#if __GNUC_PREREQ__(2, 0) || defined(lint)
 typedef unsigned int   qshift_t;
 #else
 typedef u_quad_t       qshift_t;
diff -r b4a7152aa784 -r 1850d4e22ae7 sys/arch/i386/include/ansi.h
--- a/sys/arch/i386/include/ansi.h      Fri May 05 00:19:04 2000 +0000
+++ b/sys/arch/i386/include/ansi.h      Fri May 05 00:20:22 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ansi.h,v 1.10 2000/05/03 21:54:06 thorpej Exp $        */
+/*     $NetBSD: ansi.h,v 1.11 2000/05/05 00:21:48 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -38,6 +38,8 @@
 #ifndef        _ANSI_H_
 #define        _ANSI_H_
 
+#include <sys/cdefs.h>
+
 /*
  * Types which are fundamental to the implementation and may appear in
  * more than one standard header are defined here.  Standard headers
@@ -52,8 +54,7 @@
 #define        _BSD_SIZE_T_            unsigned int    /* sizeof() */
 #define        _BSD_SSIZE_T_           int             /* byte count or error */
 #define        _BSD_TIME_T_            long            /* time() */
-#if (__GNUC__ - 0) && \
-    ((__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (__GNUC__ > 2))
+#if __GNUC_PREREQ__(2, 96)
 #define        _BSD_VA_LIST_           __builtin_va_list /* GCC built-in type */
 #else
 #define        _BSD_VA_LIST_           char *          /* va_list */
diff -r b4a7152aa784 -r 1850d4e22ae7 sys/arch/i386/include/stdarg.h
--- a/sys/arch/i386/include/stdarg.h    Fri May 05 00:19:04 2000 +0000
+++ b/sys/arch/i386/include/stdarg.h    Fri May 05 00:20:22 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stdarg.h,v 1.18 2000/05/03 21:54:06 thorpej Exp $      */
+/*     $NetBSD: stdarg.h,v 1.19 2000/05/05 00:21:48 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -51,8 +51,7 @@
 #define        __builtin_va_copy(d, s)         ((d) = (s))
 #endif
 
-#if (__GNUC__ - 0) && \
-    ((__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (__GNUC__ > 2))
+#if __GNUC_PREREQ__(2, 96)
 #define        va_start(ap, last)      __builtin_stdarg_start((ap), (last))
 #define        va_arg                  __builtin_va_arg
 #define        va_end                  __builtin_va_end
diff -r b4a7152aa784 -r 1850d4e22ae7 sys/arch/i386/include/varargs.h
--- a/sys/arch/i386/include/varargs.h   Fri May 05 00:19:04 2000 +0000
+++ b/sys/arch/i386/include/varargs.h   Fri May 05 00:20:22 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: varargs.h,v 1.15 2000/05/03 21:54:06 thorpej Exp $     */
+/*     $NetBSD: varargs.h,v 1.16 2000/05/05 00:21:49 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1990, 1993
@@ -45,7 +45,7 @@
 
 #include <machine/stdarg.h>
 
-#if (__GNUC__ - 0) == 1
+#if !__GNUC_PREREQ__(2, 0)
 #define        __va_ellipsis
 #else
 #define        __va_ellipsis   ...
@@ -55,8 +55,7 @@
 #define        va_dcl          __builtin_va_alist_t __builtin_va_alist; __va_ellipsis
 
 #undef va_start
-#if (__GNUC__ - 0) && \
-    ((__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || (__GNUC__ > 2))
+#if __GNUC_PREREQ__(2, 96)
 #define        va_start(ap)    __builtin_varargs_start((ap))
 #else
 #define        va_start(ap) \
diff -r b4a7152aa784 -r 1850d4e22ae7 sys/lib/libkern/quad.h
--- a/sys/lib/libkern/quad.h    Fri May 05 00:19:04 2000 +0000
+++ b/sys/lib/libkern/quad.h    Fri May 05 00:20:22 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: quad.h,v 1.13 2000/03/27 12:00:48 simonb Exp $ */
+/*     $NetBSD: quad.h,v 1.14 2000/05/05 00:20:22 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -107,7 +107,7 @@
  * as u_quad_t, while gcc 2 correctly uses int.  Unfortunately, we still use
  * both compilers.
  */
-#if (__GNUC__ >= 2) || defined(lint)
+#if __GNUC_PREREQ__(2, 0) || defined(lint)
 typedef unsigned int   qshift_t;
 #else
 typedef u_quad_t       qshift_t;



Home | Main Index | Thread Index | Old Index