sys/{stat,types}.h: mode_t, umask (take 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've dropped the definition of u_{char,short,int,long}
from sys/types.h, it clashes with similar definitions
from winsock.h.

Francois, since you are hacking winsock.h, can you
please look into moving the definition of
u_{char,short,int,long} from winsock.h into sys/types.h?
In Unix apps expect it in sys/types.h... If we don't
provide it, we have problems again because libc does,
and there's no easy way to test for it. Same problem
as with the unistd.h.

ChangeLog
  Unix compatibility fixes:
    - Define umask in sys/stat.h and sys/types.h
    - Define mode_t, in sys/types.h

Index: include/msvcrt/sys/stat.h
===================================================================
RCS file: /var/cvs/wine/include/msvcrt/sys/stat.h,v
retrieving revision 1.6
diff -u -r1.6 stat.h
--- include/msvcrt/sys/stat.h	18 Dec 2002 20:17:20 -0000	1.6
+++ include/msvcrt/sys/stat.h	9 Jan 2003 22:22:37 -0000
@@ -106,6 +106,7 @@
 int MSVCRT(_stat)(const char*,struct _stat*);
 int _fstati64(int,struct _stati64*);
 int _stati64(const char*,struct _stati64*);
+int _umask(int);
 
 #ifndef MSVCRT_WSTAT_DEFINED
 #define MSVCRT_WSTAT_DEFINED
@@ -129,6 +130,7 @@
 
 #define fstat _fstat
 #define stat _stat
+#define umask _umask
 #endif /* USE_MSVCRT_PREFIX */
 
 #endif /* __WINE_SYS_STAT_H */
Index: include/msvcrt/sys/types.h
===================================================================
RCS file: /var/cvs/wine/include/msvcrt/sys/types.h,v
retrieving revision 1.6
diff -u -r1.6 types.h
--- include/msvcrt/sys/types.h	18 Dec 2002 20:17:20 -0000	1.6
+++ include/msvcrt/sys/types.h	10 Jan 2003 05:37:43 -0000
@@ -39,6 +39,11 @@
 #define MSVCRT_INO_T_DEFINED
 #endif
 
+#ifndef MSVCRT_MODE_T_DEFINED
+typedef unsigned short _mode_t;
+#define MSVCRT_MODE_T_DEFINED
+#endif
+
 #ifndef MSVCRT_OFF_T_DEFINED
 typedef int MSVCRT(_off_t);
 #define MSVCRT_OFF_T_DEFINED
@@ -49,11 +54,22 @@
 #define MSVCRT_TIME_T_DEFINED
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int _umask(int);
+
+#ifdef __cplusplus
+}
+#endif
 
 #ifndef USE_MSVCRT_PREFIX
 #define dev_t _dev_t
 #define ino_t _ino_t
+#define mode_t _mode_t
 #define off_t _off_t
+#define umask _umask
 #endif /* USE_MSVCRT_PREFIX */
 
 #endif /* __WINE_SYS_TYPES_H */


-- 
Dimi.




[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux