diff options
author | DJ Delorie <dj@redhat.com> | 2000-08-01 20:51:51 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2000-08-01 20:51:51 +0000 |
commit | 749d9bcd4b38c921930a9ce51bea2a8df0edf940 (patch) | |
tree | 3210c1e750155e4d311738444a7171ae8b276aad /newlib/libc/include/sys | |
parent | deb2b467e949bc9a2ba4d06436f43531bd9827a8 (diff) | |
download | cygnal-749d9bcd4b38c921930a9ce51bea2a8df0edf940.tar.gz cygnal-749d9bcd4b38c921930a9ce51bea2a8df0edf940.tar.bz2 cygnal-749d9bcd4b38c921930a9ce51bea2a8df0edf940.zip |
* 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
Diffstat (limited to 'newlib/libc/include/sys')
-rw-r--r-- | newlib/libc/include/sys/config.h | 14 | ||||
-rw-r--r-- | newlib/libc/include/sys/errno.h | 9 | ||||
-rw-r--r-- | newlib/libc/include/sys/unistd.h | 2 |
3 files changed, 17 insertions, 8 deletions
diff --git a/newlib/libc/include/sys/config.h b/newlib/libc/include/sys/config.h index b0957ea33..f8bd8cdb9 100644 --- a/newlib/libc/include/sys/config.h +++ b/newlib/libc/include/sys/config.h @@ -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__ */ diff --git a/newlib/libc/include/sys/errno.h b/newlib/libc/include/sys/errno.h index cc791fcb2..6709a1ca2 100644 --- a/newlib/libc/include/sys/errno.h +++ b/newlib/libc/include/sys/errno.h @@ -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) diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index d681c5c86..609a64df5 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -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))); |