Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2000-08-02 00:51:51 +0400
committerDJ Delorie <dj@redhat.com>2000-08-02 00:51:51 +0400
commit749d9bcd4b38c921930a9ce51bea2a8df0edf940 (patch)
tree3210c1e750155e4d311738444a7171ae8b276aad /newlib
parentdeb2b467e949bc9a2ba4d06436f43531bd9827a8 (diff)
* 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')
-rw-r--r--newlib/ChangeLog11
-rw-r--r--newlib/libc/include/ctype.h6
-rw-r--r--newlib/libc/include/math.h19
-rw-r--r--newlib/libc/include/stdlib.h6
-rw-r--r--newlib/libc/include/sys/config.h14
-rw-r--r--newlib/libc/include/sys/errno.h9
-rw-r--r--newlib/libc/include/sys/unistd.h2
-rw-r--r--newlib/libc/include/time.h6
-rw-r--r--newlib/libc/include/unctrl.h4
9 files changed, 39 insertions, 38 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index ec72e9c7e..a830dd736 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -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
diff --git a/newlib/libc/include/ctype.h b/newlib/libc/include/ctype.h
index 56ca356ee..624cb1c6f 100644
--- a/newlib/libc/include/ctype.h
+++ b/newlib/libc/include/ctype.h
@@ -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)
diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h
index 6a6440dc7..f092aff19 100644
--- a/newlib/libc/include/math.h
+++ b/newlib/libc/include/math.h
@@ -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
diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h
index 326213b3c..2d2b8b176 100644
--- a/newlib/libc/include/stdlib.h
+++ b/newlib/libc/include/stdlib.h
@@ -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
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)));
diff --git a/newlib/libc/include/time.h b/newlib/libc/include/time.h
index 91616b7f8..d3ced3854 100644
--- a/newlib/libc/include/time.h
+++ b/newlib/libc/include/time.h
@@ -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));
diff --git a/newlib/libc/include/unctrl.h b/newlib/libc/include/unctrl.h
index 8205ea60e..004075232 100644
--- a/newlib/libc/include/unctrl.h
+++ b/newlib/libc/include/unctrl.h
@@ -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_ */