* 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:
DJ Delorie 2000-08-01 20:51:51 +00:00
parent deb2b467e9
commit 749d9bcd4b
9 changed files with 39 additions and 38 deletions

View File

@ -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>
* libc/include/math.h (__infinity): Declare as an array without

View File

@ -36,11 +36,7 @@ int _EXFUN(_toupper, (int __c));
#define _X 0100
#define _B 0200
#if !defined(__CYGWIN__) || defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
extern _CONST char _ctype_[];
#else
extern _CONST char _ctype_[] __declspec(dllimport);
#endif
extern __IMPORT _CONST char _ctype_[];
#define isalpha(c) ((_ctype_+1)[(unsigned)(c)]&(_U|_L))
#define isupper(c) ((_ctype_+1)[(unsigned)(c)]&_U)

View File

@ -23,19 +23,8 @@ union __dmath
/* 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
method for accessing globals.
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[];
method for accessing globals. */
extern __IMPORT const union __dmath __infinity[];
#define HUGE_VAL (__infinity[0].d)
@ -197,7 +186,7 @@ extern float dremf _PARAMS((float, float));
/* The gamma functions use a global variable, signgam. */
extern int signgam;
extern __IMPORT int signgam;
/* 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 __fdlib_version
extern _CONST _LIB_VERSION_TYPE _LIB_VERSION;
extern __IMPORT _CONST _LIB_VERSION_TYPE _LIB_VERSION;
#define _IEEE_ __fdlibm_ieee
#define _SVID_ __fdlibm_svid

View File

@ -39,11 +39,7 @@ typedef struct
#define RAND_MAX __RAND_MAX
#if (defined(__CYGWIN__) || defined(__CYGWIN__)) && ! defined(_COMPILING_NEWLIB)
extern __declspec(dllimport) int __mb_cur_max;
#else
extern int __mb_cur_max;
#endif
extern __IMPORT int __mb_cur_max;
#define MB_CUR_MAX __mb_cur_max

View File

@ -125,4 +125,18 @@ typedef unsigned int __uint32_t;
#define __RAND_MAX 0x7fffffff
#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__ */

View File

@ -15,13 +15,8 @@ extern "C" {
extern int *__errno _PARAMS ((void));
#endif
#if !defined(__CYGWIN__) || defined(__INSIDE_CYGWIN__)
extern _CONST char * _CONST _sys_errlist[];
extern int _sys_nerr;
#else
extern _CONST char * _CONST _sys_errlist[] __declspec(dllimport);
extern int _sys_nerr __declspec(dllimport);
#endif
extern __IMPORT _CONST char * _CONST _sys_errlist[];
extern __IMPORT int _sys_nerr;
#define __errno_r(ptr) ((ptr)->_errno)

View File

@ -10,7 +10,7 @@ extern "C" {
#define __need_size_t
#include <stddef.h>
extern char **environ;
extern __IMPORT char **environ;
void _EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn)));

View File

@ -74,9 +74,9 @@ struct tm *_EXFUN(localtime_r, (const time_t *, struct tm *));
#ifdef __CYGWIN__
#ifndef __STRICT_ANSI__
extern time_t _timezone __declspec(dllimport);
extern int _daylight __declspec(dllimport);
extern char *_tzname[2] __declspec(dllimport);
extern __IMPORT time_t _timezone;
extern __IMPORT int _daylight;
extern __IMPORT char *_tzname[2];
char *_EXFUN(timezone, (void));
void _EXFUN(tzset, (void));

View File

@ -40,7 +40,7 @@
#define unctrl(c) __unctrl[(c) & 0xff]
#define unctrllen(ch) __unctrllen[(ch) & 0xff]
extern _CONST char * _CONST __unctrl[256]; /* Control strings. */
extern _CONST char __unctrllen[256]; /* Control strings length. */
extern __IMPORT _CONST char * _CONST __unctrl[256]; /* Control strings. */
extern __IMPORT _CONST char __unctrllen[256]; /* Control strings length. */
#endif /* _UNCTRL_H_ */