Mail Archives: djgpp-workers/2003/02/02/10:30:14
Hello.
Below is a patch to add C99 sections to the remaining headers.
Here's what's changed:
* I moved isblank in <ctype.h> into the C99 section. This included
a similar change to <inlines/ctype.ha>.
* I moved various functions in <stdio.h> into the C99 section.
* I moved various functions in <stdlib.h> into the C99 section.
* I moved various definitions/variables in <math.h> into the C99 section.
* I added C++ guards to <stdint.h> and added two sections for C99 stuff:
one for free-standing implementations and for one normal implementations.
* I moved the whole of <inttypes.h> into a C99 section. When I wrote
the include file originally, I forgot to make the definitions
of PRI* and SCN* conditional on __STDC_FORMAT_MACROS for C++,
as is required by the standard. This patch fixes that bug too.
* I added two sections to <float.h>, <limits.h>, <stddef.h> for C99 stuff:
one for free-standing implementations and for one normal
implementations.
* According to the C99 standard, the defines in <stdarg.h> should be
available for free-standing implementations. So I moved the #ifdef
on __dj_ENFORCE_ANSI_FREESTANDING to after the definitions. I also
added two sections for C99 stuff: one for free-standing implementations
and for one normal implementations.
Was <stdarg.h> supposed to be able for free-standing implementations
in C89?
Most of these aren't particularly controversial, so the patch can probably
be committed in pieces. I think the only controversial part is
the last one.
OK to commit?
Thanks, bye, Rich =]
Index: include/_ansi
===================================================================
RCS file: /cvs/djgpp/djgpp/include/_ansi,v
retrieving revision 1.1
diff -p -c -3 -r1.1 _ansi
*** include/_ansi 7 Dec 1994 07:02:40 -0000 1.1
--- include/_ansi 2 Feb 2003 15:22:46 -0000
*************** extern "C" {
*** 7,12 ****
--- 7,17 ----
#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/ctype.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/ctype.h,v
retrieving revision 1.2
diff -p -c -3 -r1.2 ctype.h
*** include/ctype.h 17 Oct 2002 15:10:50 -0000 1.2
--- include/ctype.h 2 Feb 2003 15:22:46 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_ctype_h_
*************** extern "C" {
*** 11,17 ****
int isalnum(int c);
int isalpha(int c);
- int isblank(int c);
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
--- 12,17 ----
*************** int isxdigit(int c);
*** 24,33 ****
int tolower(int c);
int toupper(int c);
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#include <inlines/ctype.ha>
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
!
#ifndef __STRICT_ANSI__
#ifndef _POSIX_SOURCE
--- 24,45 ----
int tolower(int c);
int toupper(int c);
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || !defined(__STRICT_ANSI__)
+
+ int isblank(int c);
+
+ #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
+
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#include <inlines/ctype.ha>
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
!
! #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
! || !defined(__STRICT_ANSI__)
!
! #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
!
#ifndef __STRICT_ANSI__
#ifndef _POSIX_SOURCE
Index: include/stdio.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/stdio.h,v
retrieving revision 1.9
diff -p -c -3 -r1.9 stdio.h
*** include/stdio.h 29 Jan 2003 01:26:03 -0000 1.9
--- include/stdio.h 2 Feb 2003 15:22:51 -0000
*************** void rewind(FILE *_stream);
*** 106,112 ****
int scanf(const char *_format, ...);
void setbuf(FILE *_stream, char *_buf);
int setvbuf(FILE *_stream, char *_buf, int _mode, size_t _size);
- int snprintf(char *str, size_t n, const char *fmt, ...);
int sprintf(char *_s, const char *_format, ...);
int sscanf(const char *_s, const char *_format, ...);
FILE * tmpfile(void);
--- 106,111 ----
*************** char * tmpnam(char *_s);
*** 114,122 ****
int ungetc(int _c, FILE *_stream);
int vfprintf(FILE *_stream, const char *_format, va_list _ap);
int vprintf(const char *_format, va_list _ap);
- int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
int vsprintf(char *_s, const char *_format, va_list _ap);
#ifndef __STRICT_ANSI__
#define L_ctermid 20
--- 113,131 ----
int ungetc(int _c, FILE *_stream);
int vfprintf(FILE *_stream, const char *_format, va_list _ap);
int vprintf(const char *_format, va_list _ap);
int vsprintf(char *_s, const char *_format, va_list _ap);
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || !defined(__STRICT_ANSI__)
+
+ int snprintf(char *str, size_t n, const char *fmt, ...);
+ int vfscanf(FILE *_stream, const char *_format, va_list _ap);
+ int vscanf(const char *_format, va_list _ap);
+ int vsnprintf(char *str, size_t n, const char *fmt, va_list ap);
+ int vsscanf(const char *_s, const char *_format, va_list _ap);
+
+ #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
+
#ifndef __STRICT_ANSI__
#define L_ctermid 20
*************** int mkstemp(char *_template);
*** 129,137 ****
int pclose(FILE *_pf);
FILE * popen(const char *_command, const char *_mode);
char * tempnam(const char *_dir, const char *_prefix);
- int vfscanf(FILE *_stream, const char *_format, va_list _ap);
- int vscanf(const char *_format, va_list _ap);
- int vsscanf(const char *_s, const char *_format, va_list _ap);
#ifndef _POSIX_SOURCE
--- 138,143 ----
Index: include/stdlib.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/stdlib.h,v
retrieving revision 1.16
diff -p -c -3 -r1.16 stdlib.h
*** include/stdlib.h 8 Jan 2003 20:16:51 -0000 1.16
--- include/stdlib.h 2 Feb 2003 15:22:52 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 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 */
*************** __DJ_wchar_t
*** 46,52 ****
#define _WCHAR_T
#endif
- void _Exit(int _status) __attribute__((noreturn));
void abort(void) __attribute__((noreturn));
int abs(int _i);
int atexit(void (*_func)(void));
--- 47,52 ----
*************** int rand(void);
*** 72,85 ****
void * realloc(void *_ptr, size_t _size);
void srand(unsigned _seed);
double strtod(const char *_s, char **_endptr);
- float strtof(const char *_s, char **_endptr);
long strtol(const char *_s, char **_endptr, int _base);
- long double strtold(const char *_s, char **_endptr);
unsigned long strtoul(const char *_s, char **_endptr, int _base);
int system(const char *_s);
size_t wcstombs(char *_s, const wchar_t *_wcs, size_t _n);
int wctomb(char *_s, wchar_t _wchar);
#ifndef __STRICT_ANSI__
long a64l(const char *_string);
--- 72,102 ----
void * realloc(void *_ptr, size_t _size);
void srand(unsigned _seed);
double strtod(const char *_s, char **_endptr);
long strtol(const char *_s, char **_endptr, int _base);
unsigned long strtoul(const char *_s, char **_endptr, int _base);
int system(const char *_s);
size_t wcstombs(char *_s, const wchar_t *_wcs, size_t _n);
int wctomb(char *_s, wchar_t _wchar);
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || !defined(__STRICT_ANSI__)
+
+ typedef struct {
+ long long int quot;
+ long long int rem;
+ } lldiv_t;
+
+ void _Exit(int _status) __attribute__((noreturn));
+ long long int atoll(const char *_s);
+ long long int llabs(long long int _i);
+ lldiv_t lldiv(long long int _numer, long long int _denom);
+ float strtof(const char *_s, char **_endptr);
+ long double strtold(const char *_s, char **_endptr);
+ long long int strtoll(const char *_s, char **_endptr, int _base);
+ unsigned long long int strtoull(const char *_s, char **_endptr, int _base);
+
+ #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
+
#ifndef __STRICT_ANSI__
long a64l(const char *_string);
*************** int unsetenv(const char *_var);
*** 91,104 ****
#ifndef _POSIX_SOURCE
- typedef struct {
- long long int quot;
- long long int rem;
- } lldiv_t;
-
void * alloca(size_t _size);
long double _atold(const char *_s);
- long long int atoll(const char *_s);
void cfree(void *_ptr);
double drand48(void);
char * ecvtbuf(double _val, int _nd, int *_dp, int *_sn, char *_bf);
--- 108,115 ----
*************** char * getpass(const char *_prompt);
*** 111,118 ****
int getlongpass(const char *_prompt, char *_buffer, int _max_len);
char * itoa(int _value, char *_buffer, int _radix);
long jrand48(unsigned short _state[3]);
- long long int llabs(long long int _i);
- lldiv_t lldiv(long long int _numer, long long int _denom);
void lcong48(unsigned short _param[7]);
unsigned long lrand48(void);
void * memalign (size_t _amt, size_t _align);
--- 122,127 ----
*************** unsigned short *seed48(unsigned short _s
*** 122,129 ****
void srand48(long _seedval);
int stackavail(void);
long double _strtold(const char *_s, char **_endptr);
- long long int strtoll(const char *_s, char **_endptr, int _base);
- unsigned long long int strtoull(const char *_s, char **_endptr, int _base);
void swab(const void *_from, void *_to, int _nbytes);
void * valloc (size_t _amt);
--- 131,136 ----
Index: include/inlines/ctype.ha
===================================================================
RCS file: /cvs/djgpp/djgpp/include/inlines/ctype.ha,v
retrieving revision 1.3
diff -p -c -3 -r1.3 ctype.ha
*** include/inlines/ctype.ha 17 Oct 2002 15:10:50 -0000 1.3
--- include/inlines/ctype.ha 2 Feb 2003 15:22:58 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_include_inline_ctype_ha_
#define __dj_include_inline_ctype_ha_
*************** extern unsigned char __dj_ctype_tolower[
*** 20,26 ****
#define isalnum(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISALNUM)
#define isalpha(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISALPHA)
- #define isblank(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISBLANK)
#define iscntrl(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISCNTRL)
#define isdigit(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISDIGIT)
#define isgraph(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISGRAPH)
--- 21,26 ----
*************** extern unsigned char __dj_ctype_tolower[
*** 30,35 ****
--- 30,42 ----
#define isspace(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISSPACE)
#define isupper(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISUPPER)
#define isxdigit(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISXDIGIT)
+
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || !defined(__STRICT_ANSI__)
+
+ #define isblank(c) (__dj_ctype_flags[(int)(c)+1] & __dj_ISBLANK)
+
+ #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
#define tolower(c) (__dj_ctype_tolower[(int)(c)+1])
#define toupper(c) (__dj_ctype_toupper[(int)(c)+1])
Index: include/stdint.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/stdint.h,v
retrieving revision 1.3
diff -p -c -3 -r1.3 stdint.h
*** include/stdint.h 14 Dec 2002 12:39:09 -0000 1.3
--- include/stdint.h 2 Feb 2003 15:22:58 -0000
***************
*** 1,8 ****
--- 1,15 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_stdint__h_
#define __dj_stdint__h_
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+
typedef signed char int_least8_t;
typedef unsigned char uint_least8_t;
typedef signed char int_fast8_t;
*************** __extension__ typedef unsigned long long
*** 129,135 ****
#endif /* !__cplusplus || __STDC_CONSTANT_MACROS */
! #ifndef __dj_ENFORCE_ANSI_FREESTANDING
#ifndef __STRICT_ANSI__
--- 136,149 ----
#endif /* !__cplusplus || __STDC_CONSTANT_MACROS */
! #endif /* __STDC_VERSION__ >= 199901L */
!
! #ifndef __dj_ENFORCE_ANSI_FREESTANDIGN
!
! #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
! || !defined(__STRICT_ANSI__)
!
! #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
#ifndef __STRICT_ANSI__
*************** __extension__ typedef unsigned long long
*** 141,145 ****
--- 155,163 ----
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
+
+ #ifdef __cplusplus
+ }
+ #endif
#endif /* !__dj_stdint__h_ */
Index: include/inttypes.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/inttypes.h,v
retrieving revision 1.1
diff -p -c -3 -r1.1 inttypes.h
*** include/inttypes.h 15 Dec 2002 09:30:51 -0000 1.1
--- include/inttypes.h 2 Feb 2003 15:23:05 -0000
***************
*** 1,3 ****
--- 1,4 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
#include <stdint.h>
*************** extern "C" {
*** 10,15 ****
--- 11,24 ----
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || !defined(__STRICT_ANSI__)
+
+ /* ANSI/ISO C99 says these should not be visible in C++ unless
+ explicitly requested. */
+
+ #if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
+
#define PRId8 "hhd"
#define PRId16 "hd"
#define PRId32 "ld"
*************** extern "C" {
*** 175,180 ****
--- 184,191 ----
#define SCNxMAX "llx"
#define SCNxPTR "lx"
+ #endif /* !__cplusplus || __STDC_FORMAT_MACROS */
+
typedef struct {
intmax_t quot;
intmax_t rem;
*************** intmax_t imaxabs (intmax_t _j);
*** 184,189 ****
--- 195,202 ----
imaxdiv_t imaxdiv (intmax_t _numer, intmax_t _denom);
intmax_t strtoimax (const char *_nptr, char **_endptr, int _base);
uintmax_t strtoumax (const char *_nptr, char **_endptr, int _base);
+
+ #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
#ifndef __STRICT_ANSI__
Index: include/float.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/float.h,v
retrieving revision 1.1
diff -p -c -3 -r1.1 float.h
*** include/float.h 23 Aug 1995 05:02:58 -0000 1.1
--- include/float.h 2 Feb 2003 15:23:06 -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_
*************** extern long double __dj_long_double_min;
*** 50,56 ****
--- 51,66 ----
#define LDBL_MIN_10_EXP (-4931)
#define LDBL_MIN_EXP (-16381)
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+
+ #endif /* __STDC_VERSION__ >= 199901L */
+
#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 -c -3 -r1.8 stdarg.h
*** include/stdarg.h 2 Jan 2001 17:08:26 -0000 1.8
--- include/stdarg.h 2 Feb 2003 15:23:12 -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,16 ****
extern "C" {
#endif
- #ifndef __dj_ENFORCE_ANSI_FREESTANDING
-
#ifdef __dj_include_varargs_h_
#error stdarg.h and varargs.h are mutually exclusive
#endif
--- 10,15 ----
*************** __DJ_va_list
*** 46,52 ****
(ap = ((va_list) __builtin_next_arg (last_arg)))
#endif /* #if ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96)) || (__GNUC__ >= 3) */
!
#ifndef __STRICT_ANSI__
#ifndef _POSIX_SOURCE
--- 45,62 ----
(ap = ((va_list) __builtin_next_arg (last_arg)))
#endif /* #if ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96)) || (__GNUC__ >= 3) */
!
! #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
!
! #endif /* __STDC_VERSION__ >= 199901L */
!
! #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 -c -3 -r1.4 stddef.h
*** include/stddef.h 17 Oct 2002 23:00:24 -0000 1.4
--- include/stddef.h 2 Feb 2003 15:23:12 -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 */
*************** __DJ_wchar_t
*** 33,39 ****
--- 34,49 ----
#define _WCHAR_T
#endif
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+
+ #endif /* __STDC_VERSION__ >= 199901L */
+
#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/stdint.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/stdint.h,v
retrieving revision 1.3
diff -p -c -3 -r1.3 stdint.h
*** include/stdint.h 14 Dec 2002 12:39:09 -0000 1.3
--- include/stdint.h 2 Feb 2003 15:23:17 -0000
***************
*** 1,8 ****
--- 1,15 ----
+ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2002 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 2001 DJ Delorie, see COPYING.DJ for details */
#ifndef __dj_stdint__h_
#define __dj_stdint__h_
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+
typedef signed char int_least8_t;
typedef unsigned char uint_least8_t;
typedef signed char int_fast8_t;
*************** __extension__ typedef unsigned long long
*** 129,135 ****
#endif /* !__cplusplus || __STDC_CONSTANT_MACROS */
! #ifndef __dj_ENFORCE_ANSI_FREESTANDING
#ifndef __STRICT_ANSI__
--- 136,149 ----
#endif /* !__cplusplus || __STDC_CONSTANT_MACROS */
! #endif /* __STDC_VERSION__ >= 199901L */
!
! #ifndef __dj_ENFORCE_ANSI_FREESTANDIGN
!
! #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
! || !defined(__STRICT_ANSI__)
!
! #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
#ifndef __STRICT_ANSI__
*************** __extension__ typedef unsigned long long
*** 141,145 ****
--- 155,163 ----
#ifndef __dj_ENFORCE_FUNCTION_CALLS
#endif /* !__dj_ENFORCE_FUNCTION_CALLS */
+
+ #ifdef __cplusplus
+ }
+ #endif
#endif /* !__dj_stdint__h_ */
Index: include/math.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/math.h,v
retrieving revision 1.6
diff -p -c -3 -r1.6 math.h
*** include/math.h 23 Jan 2003 19:50:51 -0000 1.6
--- include/math.h 2 Feb 2003 15:23:18 -0000
*************** extern "C" {
*** 15,27 ****
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
! extern double __dj_huge_val;
! extern float __dj_huge_valf;
! extern long double __dj_huge_vall;
#define HUGE_VAL __dj_huge_val
- #define HUGE_VALF __dj_huge_valf
- #define HUGE_VALL __dj_huge_vall
double acos(double _x);
double asin(double _x);
--- 15,23 ----
#ifndef __dj_ENFORCE_ANSI_FREESTANDING
! extern double __dj_huge_val;
#define HUGE_VAL __dj_huge_val
double acos(double _x);
double asin(double _x);
*************** double sinh(double _x);
*** 45,50 ****
--- 41,57 ----
double sqrt(double _x);
double tan(double _x);
double tanh(double _x);
+
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
+ || !defined(__STRICT_ANSI__)
+
+ extern float __dj_huge_valf;
+ extern long double __dj_huge_vall;
+
+ #define HUGE_VALF __dj_huge_valf
+ #define HUGE_VALL __dj_huge_vall
+
+ #endif /* (__STDC_VERSION__ >= 199901L) || !__STRICT_ANSI__ */
#ifndef __STRICT_ANSI__
Index: include/limits.h
===================================================================
RCS file: /cvs/djgpp/djgpp/include/limits.h,v
retrieving revision 1.5
diff -p -c -3 -r1.5 limits.h
*** include/limits.h 17 Oct 2002 23:00:24 -0000 1.5
--- include/limits.h 2 Feb 2003 15:23:27 -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) 1998 DJ Delorie, see COPYING.DJ for details */
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
*************** extern "C" {
*** 39,45 ****
--- 40,55 ----
#define WINT_MAX 2147483647
#endif
+ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
+
+ #endif /* __STDC_VERSION__ >= 199901L */
+
#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 -