* libc/include/sys/config.h: define __IMPORT appropriately
* libc/include/ctype.h (_ctype_): use __IMPORT * libc/include/math.h (__infinity, signam, _LIB_VERSION): ditto * libc/include/math.h (__mb_cur_max): ditto * libc/include/time.h (_timezone, _daylight, _tzname): ditto * libc/include/unctrl.h (__unctrl, __unctrllen): ditto * libc/include/errno.h (_sys_errlist, _sys_nerr): ditto * libc/include/unistd.h (environ): ditto
This commit is contained in:
		| @@ -1,3 +1,14 @@ | |||||||
|  | 2000-08-01  DJ Delorie  <dj@redhat.com> | ||||||
|  |  | ||||||
|  | 	* libc/include/sys/config.h: define __IMPORT appropriately | ||||||
|  | 	* libc/include/ctype.h (_ctype_): use __IMPORT | ||||||
|  | 	* libc/include/math.h (__infinity, signam, _LIB_VERSION): ditto | ||||||
|  | 	* libc/include/math.h (__mb_cur_max): ditto | ||||||
|  | 	* libc/include/time.h (_timezone, _daylight, _tzname): ditto | ||||||
|  | 	* libc/include/unctrl.h (__unctrl, __unctrllen): ditto | ||||||
|  | 	* libc/include/errno.h (_sys_errlist, _sys_nerr): ditto | ||||||
|  | 	* libc/include/unistd.h (environ): ditto | ||||||
|  |  | ||||||
| 2000-07-28  Michael Meissner  <meissner@redhat.com> | 2000-07-28  Michael Meissner  <meissner@redhat.com> | ||||||
|  |  | ||||||
| 	* libc/include/math.h (__infinity): Declare as an array without | 	* libc/include/math.h (__infinity): Declare as an array without | ||||||
|   | |||||||
| @@ -36,11 +36,7 @@ int _EXFUN(_toupper, (int __c)); | |||||||
| #define _X	0100 | #define _X	0100 | ||||||
| #define	_B	0200 | #define	_B	0200 | ||||||
|  |  | ||||||
| #if !defined(__CYGWIN__) || defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB) | extern	__IMPORT _CONST char	_ctype_[]; | ||||||
| extern	_CONST char	_ctype_[]; |  | ||||||
| #else |  | ||||||
| extern	_CONST char	_ctype_[] __declspec(dllimport); |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| #define	isalpha(c)	((_ctype_+1)[(unsigned)(c)]&(_U|_L)) | #define	isalpha(c)	((_ctype_+1)[(unsigned)(c)]&(_U|_L)) | ||||||
| #define	isupper(c)	((_ctype_+1)[(unsigned)(c)]&_U) | #define	isupper(c)	((_ctype_+1)[(unsigned)(c)]&_U) | ||||||
|   | |||||||
| @@ -23,19 +23,8 @@ union __dmath | |||||||
|  |  | ||||||
| /* Declare this as an array without bounds so that no matter what small data | /* Declare this as an array without bounds so that no matter what small data | ||||||
|    support a port and/or library has, this reference will be via the general |    support a port and/or library has, this reference will be via the general | ||||||
|    method for accessing globals. |    method for accessing globals. */ | ||||||
|  | extern __IMPORT const union __dmath __infinity[]; | ||||||
|    Also under Cygwin, the library exports a pointer to the real value, so we |  | ||||||
|    need to properly dereference it.  */ |  | ||||||
| #ifndef __INFINITY_DECL__ |  | ||||||
| #if !defined(__CYGWIN__) || defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB) |  | ||||||
| #define __INFINITY_DECL__ |  | ||||||
| #else |  | ||||||
| #define __INFINITY_DECL__ __declspec(dllimport) |  | ||||||
| #endif |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| extern __INFINITY_DECL__ const union __dmath __infinity[]; |  | ||||||
|  |  | ||||||
| #define HUGE_VAL (__infinity[0].d) | #define HUGE_VAL (__infinity[0].d) | ||||||
|  |  | ||||||
| @@ -197,7 +186,7 @@ extern float dremf _PARAMS((float, float)); | |||||||
|  |  | ||||||
| /* The gamma functions use a global variable, signgam.  */ | /* The gamma functions use a global variable, signgam.  */ | ||||||
|  |  | ||||||
| extern int signgam; | extern __IMPORT int signgam; | ||||||
|  |  | ||||||
| /* The exception structure passed to the matherr routine.  */ | /* The exception structure passed to the matherr routine.  */ | ||||||
|  |  | ||||||
| @@ -268,7 +257,7 @@ enum __fdlibm_version | |||||||
| #define _LIB_VERSION_TYPE enum __fdlibm_version | #define _LIB_VERSION_TYPE enum __fdlibm_version | ||||||
| #define _LIB_VERSION __fdlib_version | #define _LIB_VERSION __fdlib_version | ||||||
|  |  | ||||||
| extern _CONST _LIB_VERSION_TYPE _LIB_VERSION; | extern __IMPORT _CONST _LIB_VERSION_TYPE _LIB_VERSION; | ||||||
|  |  | ||||||
| #define _IEEE_  __fdlibm_ieee | #define _IEEE_  __fdlibm_ieee | ||||||
| #define _SVID_  __fdlibm_svid | #define _SVID_  __fdlibm_svid | ||||||
|   | |||||||
| @@ -39,11 +39,7 @@ typedef struct | |||||||
|  |  | ||||||
| #define RAND_MAX __RAND_MAX | #define RAND_MAX __RAND_MAX | ||||||
|  |  | ||||||
| #if (defined(__CYGWIN__) || defined(__CYGWIN__)) && ! defined(_COMPILING_NEWLIB) | extern __IMPORT int __mb_cur_max; | ||||||
| extern __declspec(dllimport) int __mb_cur_max; |  | ||||||
| #else |  | ||||||
| extern int __mb_cur_max; |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| #define MB_CUR_MAX __mb_cur_max | #define MB_CUR_MAX __mb_cur_max | ||||||
|  |  | ||||||
|   | |||||||
| @@ -125,4 +125,18 @@ typedef unsigned int __uint32_t; | |||||||
| #define __RAND_MAX 0x7fffffff | #define __RAND_MAX 0x7fffffff | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|  |  | ||||||
|  | #if defined(__CYGWIN32__) || defined(__CYGWIN__) | ||||||
|  | #if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB) | ||||||
|  | #define __IMPORT | ||||||
|  | #else | ||||||
|  | #define __IMPORT __declspec(dllimport) | ||||||
|  | #endif | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  | #ifndef __IMPORT | ||||||
|  | #define __IMPORT | ||||||
|  | #endif | ||||||
|  |  | ||||||
|  |  | ||||||
| #endif /* __SYS_CONFIG_H__ */ | #endif /* __SYS_CONFIG_H__ */ | ||||||
|   | |||||||
| @@ -15,13 +15,8 @@ extern "C" { | |||||||
| extern int *__errno _PARAMS ((void)); | extern int *__errno _PARAMS ((void)); | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #if !defined(__CYGWIN__) || defined(__INSIDE_CYGWIN__) | extern __IMPORT _CONST char * _CONST _sys_errlist[]; | ||||||
| extern _CONST char * _CONST _sys_errlist[]; | extern __IMPORT int _sys_nerr; | ||||||
| extern int _sys_nerr; |  | ||||||
| #else |  | ||||||
| extern _CONST char * _CONST _sys_errlist[] __declspec(dllimport); |  | ||||||
| extern int _sys_nerr __declspec(dllimport); |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| #define __errno_r(ptr) ((ptr)->_errno) | #define __errno_r(ptr) ((ptr)->_errno) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ extern "C" { | |||||||
| #define __need_size_t | #define __need_size_t | ||||||
| #include <stddef.h> | #include <stddef.h> | ||||||
|  |  | ||||||
| extern char **environ; | extern __IMPORT char **environ; | ||||||
|  |  | ||||||
| void	_EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn))); | void	_EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn))); | ||||||
|  |  | ||||||
|   | |||||||
| @@ -74,9 +74,9 @@ struct tm *_EXFUN(localtime_r,	(const time_t *, struct tm *)); | |||||||
|  |  | ||||||
| #ifdef __CYGWIN__ | #ifdef __CYGWIN__ | ||||||
| #ifndef __STRICT_ANSI__ | #ifndef __STRICT_ANSI__ | ||||||
| extern time_t _timezone __declspec(dllimport); | extern __IMPORT time_t _timezone; | ||||||
| extern int _daylight __declspec(dllimport); | extern __IMPORT int _daylight; | ||||||
| extern char *_tzname[2] __declspec(dllimport); | extern __IMPORT char *_tzname[2]; | ||||||
|  |  | ||||||
| char *_EXFUN(timezone, (void)); | char *_EXFUN(timezone, (void)); | ||||||
| void _EXFUN(tzset, (void)); | void _EXFUN(tzset, (void)); | ||||||
|   | |||||||
| @@ -40,7 +40,7 @@ | |||||||
| #define unctrl(c)		__unctrl[(c) & 0xff] | #define unctrl(c)		__unctrl[(c) & 0xff] | ||||||
| #define unctrllen(ch)		__unctrllen[(ch) & 0xff] | #define unctrllen(ch)		__unctrllen[(ch) & 0xff] | ||||||
|  |  | ||||||
| extern _CONST char * _CONST __unctrl[256];	/* Control strings. */ | extern __IMPORT _CONST char * _CONST __unctrl[256];	/* Control strings. */ | ||||||
| extern _CONST char __unctrllen[256];	/* Control strings length. */ | extern __IMPORT _CONST char __unctrllen[256];	/* Control strings length. */ | ||||||
|  |  | ||||||
| #endif /* _UNCTRL_H_ */ | #endif /* _UNCTRL_H_ */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user