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
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2000-08-02 20:28:18 +0400
committerDJ Delorie <dj@redhat.com>2000-08-02 20:28:18 +0400
commit4c8d72ded51ac22172d4f2d0250ada6b0dd624ff (patch)
tree4573a70b613646456bd4fed93293c6355566c678 /winsup/cygwin/winsup.h
parentad8dea13f05b51769c9bef7e414f654588971c10 (diff)
* winsup.h: take out protections of environ, errno, allow C use
* *.cc: put winsup.h before other headers (for __INSIDE_CYGWIN__); use cur_environ() instead of just environ * times.cc: remove import protections * glob.c: add winsup.h * localtime.c: ditto * smallprint.c: ditto * Makefile.in: don't __INSIDE_CYGWIN__ as it messes up profiling.
Diffstat (limited to 'winsup/cygwin/winsup.h')
-rw-r--r--winsup/cygwin/winsup.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/winsup.h
index 4b61c4bbf..9a92df214 100644
--- a/winsup/cygwin/winsup.h
+++ b/winsup/cygwin/winsup.h
@@ -14,6 +14,8 @@ details. */
#define __INSIDE_CYGWIN__
+#ifdef __cplusplus
+
#define alloca(x) __builtin_alloca (x)
#define strlen __builtin_strlen
#define strcpy __builtin_strcpy
@@ -502,7 +504,6 @@ void __stdcall update_envptrs ();
char * __stdcall winenv (const char * const *, int);
extern char **__cygwin_environ, ***main_environ;
extern "C" char __stdcall **cur_environ ();
-#define environ (cur_environ ())
/* The title on program start. */
extern char *old_title;
@@ -516,8 +517,7 @@ void seterrno (const char *, int line);
#define __seterrno() seterrno (__FILE__, __LINE__)
#define __seterrno_from_win_error(val) seterrno_from_win_error (__FILE__, __LINE__, val)
-#undef errno
-#define errno dont_use_this_since_were_in_a_shared library
+
#define set_errno(val) (_impure_ptr->_errno = (val))
#define get_errno() (_impure_ptr->_errno)
extern "C" void __stdcall set_sig_errno (int e);
@@ -535,3 +535,5 @@ class save_errno
extern const char *__sp_fn;
extern int __sp_ln;
+
+#endif /* defined __cplusplus */