This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
[PATCH] Various minor cygwin changes
- From: Christopher Faylor <cgf at redhat dot com>
- To: newlib at sources dot redhat dot com
- Date: Sun, 8 Feb 2004 21:23:59 -0500
- Subject: [PATCH] Various minor cygwin changes
2004-02-08 Christopher Faylor <cgf@redhat.com>
* libc/include/sys/features.h: Add _POSIX_TIMERS define for __CYGWIN__.
* libc/include/sys/reent.h (__getreent): Protect against possibly being
defined.
* libc/include/sys/unistd.h (fdatasync): Don't define for __CYGWIN__.
Index: libc/include/sys/features.h
===================================================================
RCS file: /cvs/uberbaum/newlib/libc/include/sys/features.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- libc/include/sys/features.h 20 Jun 2002 19:51:24 -0000 1.5
+++ libc/include/sys/features.h 9 Feb 2004 02:22:01 -0000 1.6
@@ -15,7 +15,7 @@
* OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS
* SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
*
- * $Id: features.h,v 1.5 2002/06/20 19:51:24 fitzsim Exp $
+ * $Id: features.h,v 1.6 2004/02/09 02:22:01 cgf Exp $
*/
#ifndef _SYS_FEATURES_H
@@ -78,15 +78,16 @@ extern "C" {
#endif
#ifdef __CYGWIN__
-# define _POSIX_JOB_CONTROL 1
-# define _POSIX_SAVED_IDS 0
-# define _POSIX_VERSION 199009L
-# define _POSIX_THREADS 1
-# define _POSIX_THREAD_PROCESS_SHARED 1
-# define _POSIX_THREAD_SAFE_FUNCTIONS 1
-# define _POSIX_THREAD_PRIORITY_SCHEDULING 1
-# define _POSIX_THREAD_ATTR_STACKSIZE 1
-# define _POSIX_SEMAPHORES 1
+# define _POSIX_JOB_CONTROL 1
+# define _POSIX_SAVED_IDS 0
+# define _POSIX_VERSION 199009L
+# define _POSIX_THREADS 1
+# define _POSIX_THREAD_PROCESS_SHARED 1
+# define _POSIX_THREAD_SAFE_FUNCTIONS 1
+# define _POSIX_THREAD_PRIORITY_SCHEDULING 1
+# define _POSIX_THREAD_ATTR_STACKSIZE 1
+# define _POSIX_SEMAPHORES 1
+# define _POSIX_TIMERS 1
#endif
#ifdef __cplusplus
Index: libc/include/sys/reent.h
===================================================================
RCS file: /cvs/uberbaum/newlib/libc/include/sys/reent.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -p -r1.26 -r1.27
--- libc/include/sys/reent.h 8 Jan 2004 19:33:13 -0000 1.26
+++ libc/include/sys/reent.h 9 Feb 2004 02:22:01 -0000 1.27
@@ -736,7 +736,9 @@ void _reclaim_reent _PARAMS ((struct _re
#ifndef _REENT_ONLY
#if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__)
+#ifndef __getreent
struct _reent * _EXFUN(__getreent, (void));
+#endif
# define _REENT (__getreent())
#else /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */
# define _REENT _impure_ptr
Index: libc/include/sys/unistd.h
===================================================================
RCS file: /cvs/uberbaum/newlib/libc/include/sys/unistd.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -p -r1.48 -r1.49
--- libc/include/sys/unistd.h 8 Jan 2004 19:25:21 -0000 1.48
+++ libc/include/sys/unistd.h 9 Feb 2004 02:22:01 -0000 1.49
@@ -53,7 +53,9 @@ int _EXFUN(fchown, (int __fildes, ui
pid_t _EXFUN(fork, (void ));
long _EXFUN(fpathconf, (int __fd, int __name ));
int _EXFUN(fsync, (int __fd));
+#ifndef __CYGWIN__
int _EXFUN(fdatasync, (int __fd));
+#endif
char _EXFUN(*getcwd, (char *__buf, size_t __size ));
#if defined(__CYGWIN__)
int _EXFUN(getdomainname ,(char *__name, size_t __len));