delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/02/22/08:33:44

Date: Sat, 22 Feb 2003 13:36:01 +0000
From: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
Sender: rich AT phekda DOT freeserve DOT co DOT uk
To: djgpp-workers AT delorie DOT com
X-Mailer: Emacs 21.3.50 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6
Subject: C99 sections for headers and freestanding [PATCH]
Message-Id: <E18mZmU-0000fg-00@phekda.freeserve.co.uk>
Reply-To: djgpp-workers AT delorie DOT com

Hello.

Below is a patch to add C99 sections to headers that have
sections for free-standing implementations. (I committed almost
all of the patches for headers without definitions in
the free-standing sections.)

The major change is for <stdarg.h>. The C99 standard says that
the definitions in <stdarg.h> should be available in a free-standing
implementaion. Currently they are not. This patch fixes that.

OK to commit?

Thanks, bye, Rich =]

Index: include/float.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/float.h,v
retrieving revision 1.1
diff -p -u -3 -r1.1 float.h
--- include/float.h	23 Aug 1995 05:02:58 -0000	1.1
+++ include/float.h	22 Feb 2003 13:27:33 -0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
 #ifndef __dj_include_float_h_
 #define __dj_include_float_h_
@@ -50,7 +51,17 @@ extern long double __dj_long_double_min;
 #define LDBL_MIN_10_EXP	(-4931)
 #define LDBL_MIN_EXP	(-16381)
 
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+  || !defined(__STRICT_ANSI__)
+
+#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
+
 #ifndef __dj_ENFORCE_ANSI_FREESTANDING
+
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+  || !defined(__STRICT_ANSI__)
+
+#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
 
 #ifndef __STRICT_ANSI__
 
Index: include/stdarg.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/stdarg.h,v
retrieving revision 1.8
diff -p -u -3 -r1.8 stdarg.h
--- include/stdarg.h	2 Jan 2001 17:08:26 -0000	1.8
+++ include/stdarg.h	22 Feb 2003 13:27:39 -0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
@@ -9,8 +10,6 @@
 extern "C" {
 #endif
 
-#ifndef __dj_ENFORCE_ANSI_FREESTANDING
-
 #ifdef __dj_include_varargs_h_
 #error stdarg.h and varargs.h are mutually exclusive
 #endif
@@ -46,7 +45,19 @@ __DJ_va_list
  (ap = ((va_list) __builtin_next_arg (last_arg)))
 
 #endif /* #if ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96)) || (__GNUC__ >= 3) */
-  
+
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+  || !defined(__STRICT_ANSI__)
+
+#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
+
+#ifndef __dj_ENFORCE_ANSI_FREESTANDING
+
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+  || !defined(__STRICT_ANSI__)
+
+#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
+
 #ifndef __STRICT_ANSI__
 
 #ifndef _POSIX_SOURCE
Index: include/stddef.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/stddef.h,v
retrieving revision 1.4
diff -p -u -3 -r1.4 stddef.h
--- include/stddef.h	17 Oct 2002 23:00:24 -0000	1.4
+++ include/stddef.h	22 Feb 2003 13:27:39 -0000
@@ -1,3 +1,4 @@
+/* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */
 /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
@@ -33,7 +34,17 @@ __DJ_wchar_t
 #define _WCHAR_T
 #endif
 
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+  || !defined(__STRICT_ANSI__)
+
+#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
+
 #ifndef __dj_ENFORCE_ANSI_FREESTANDING
+
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+  || !defined(__STRICT_ANSI__)
+
+#endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
 
 #ifndef __STRICT_ANSI__
 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019