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:
authorCorinna Vinschen <corinna@vinschen.de>2002-02-09 23:40:37 +0300
committerCorinna Vinschen <corinna@vinschen.de>2002-02-09 23:40:37 +0300
commitf3b39c459b21309195f8a49c85395618563b2f6b (patch)
tree4886544e03ab28a4ab907fd6356ad5905bf38ea9 /newlib
parent52296b850ce86ab911ec44370d721ec2d5d95254 (diff)
* libc/include/grp.h: Include Cygwin specific header.
* libc/include/sys/stat.h: Ditto. Don't define `struct stat' when compiling for Cygwin. * libc/include/sys/types.h: Don't define off_t, uid_t and gid_t when compiling for Cygwin.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog8
-rw-r--r--newlib/libc/include/grp.h4
-rw-r--r--newlib/libc/include/sys/stat.h4
-rw-r--r--newlib/libc/include/sys/types.h5
4 files changed, 19 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 3630b1d40..6ba325412 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,11 @@
+2002-02-09 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/include/grp.h: Include Cygwin specific header.
+ * libc/include/sys/stat.h: Ditto. Don't define `struct stat'
+ when compiling for Cygwin.
+ * libc/include/sys/types.h: Don't define off_t, uid_t
+ and gid_t when compiling for Cygwin.
+
2002-02-08 matthew green <mrg@redhat.com>
* libc/include/sys/reent.h (_REENT_CHECK_EMERGENCY): Allocate
diff --git a/newlib/libc/include/grp.h b/newlib/libc/include/grp.h
index 2e676f366..e652b29f2 100644
--- a/newlib/libc/include/grp.h
+++ b/newlib/libc/include/grp.h
@@ -44,6 +44,9 @@
#define _GRP_H_
#include <sys/types.h>
+#ifdef __CYGWIN__
+#include <cygwin/grp.h>
+#endif
#if !defined(_POSIX_SOURCE) && !defined(_XOPEN_SOURCE)
#define _PATH_GROUP "/etc/group"
@@ -56,7 +59,6 @@ struct group {
char **gr_mem; /* group members */
};
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/newlib/libc/include/sys/stat.h b/newlib/libc/include/sys/stat.h
index bca437707..3ef2291c8 100644
--- a/newlib/libc/include/sys/stat.h
+++ b/newlib/libc/include/sys/stat.h
@@ -22,6 +22,9 @@ extern "C" {
sizes of any of the basic types change (short, int, long) [via a compile
time option]. */
+#ifdef __CYGWIN__
+#include <cygwin/stat.h>
+#else
struct stat
{
dev_t st_dev;
@@ -49,6 +52,7 @@ struct stat
long st_spare4[2];
#endif
};
+#endif
#define _IFMT 0170000 /* type of file */
#define _IFDIR 0040000 /* directory */
diff --git a/newlib/libc/include/sys/types.h b/newlib/libc/include/sys/types.h
index 96d25c4a0..2a12e4e34 100644
--- a/newlib/libc/include/sys/types.h
+++ b/newlib/libc/include/sys/types.h
@@ -128,10 +128,13 @@ typedef unsigned long long dev_t;
typedef short dev_t;
#endif
-typedef long off_t;
+#ifndef __CYGWIN__ /* which defines these types in it's own types.h. */
+typedef long off_t;
typedef unsigned short uid_t;
typedef unsigned short gid_t;
+#endif
+
typedef int pid_t;
typedef long key_t;
typedef long ssize_t;