]> git.sur5r.net Git - bacula/bacula/commitdiff
add __STDC__=1 for all windows includes and fixup resulting namespace changes. use...
authorChristopher S. Hull <csh@raidersolutions.com>
Tue, 24 Feb 2004 18:13:14 +0000 (18:13 +0000)
committerChristopher S. Hull <csh@raidersolutions.com>
Tue, 24 Feb 2004 18:13:14 +0000 (18:13 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1085 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/win32/compat/compat.cpp
bacula/src/win32/compat/compat.h

index c474e16df37300b105cabc78f7f22c152742c4d5..f90315972d4251a0733a4450b714676b6b444659 100644 (file)
@@ -22,8 +22,8 @@
 // Author          : Christopher S. Hull
 // Created On      : Sat Jan 31 15:55:00 2004
 // Last Modified By: Christopher S. Hull
-// Last Modified On: Mon Feb 23 10:48:23 2004
-// Update Count    : 663
+// Last Modified On: Tue Feb 24 11:01:09 2004
+// Update Count    : 664
 // $Id$
 
 #include <stdio.h>
@@ -1145,7 +1145,7 @@ write(int fd, const void *buf, size_t len)
 off_t
 lseek(int fd, off_t offset, int whence)
 {
-    return _lseek(fd, offset, whence);
+    return _lseeki64(fd, offset, whence);
 }
 
 int
index 0ab1798cde244f68526d20a04747921dedaef2e2..3b1cfa461c9732981cbfde6325c0db405429ff41 100644 (file)
  * Author          : Christopher S. Hull
  * Created On      : Fri Jan 30 13:00:51 2004
  * Last Modified By: Christopher S. Hull
- * Last Modified On: Mon Feb 23 10:39:46 2004
- * Update Count    : 202
+ * Last Modified On: Tue Feb 24 11:13:32 2004
+ * Update Count    : 218
  * $Id$
  */
 
 
 #ifndef __COMPAT_H_
 #define __COMPAT_H_
+
+#define __STDC__ 1
+
 #include <stdio.h>
 #include <basetsd.h>
 #include <stdarg.h>
@@ -44,7 +47,6 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <conio.h>
-//#include <io.h>
 #include <process.h>
 #include <errno.h>
 #include <string.h>
@@ -55,8 +57,6 @@
 #include <direct.h>
 #include <ctype.h>
 #include <fcntl.h>
-
-#define __STDC__ 1
 #include <io.h>
 
 
@@ -78,12 +78,17 @@ typedef float float32_t;
 typedef unsigned short uint16_t;
 typedef signed short int16_t;
 typedef long time_t;
-typedef long _off_t;
+#if __STDC__
+typedef _dev_t dev_t;
+typedef __int64 ino_t;
+typedef __int64 off_t;         /* STDC=1 means we can define this */
+#else
+typedef long _off_t;           /* must be same as sys/types.h */
+#endif
 typedef signed char int8_t;
 typedef int BOOL;
 #define bool BOOL
 typedef double float64_t;
-
 typedef UINT32 u_int32_t;
 typedef unsigned char u_int8_t;
 typedef unsigned short u_int16_t;
@@ -181,6 +186,20 @@ struct stat
 #define S_ISSOCK(x) 0
 #define S_ISLNK(x)      0
 
+
+#if __STDC__
+#define O_RDONLY _O_RDONLY
+#define O_WRONLY _O_WRONLY
+#define O_RDWR   _O_RDWR
+#define O_CREAT  _O_CREAT
+#define O_TRUNC  _O_TRUNC
+
+#define isascii __isascii
+#define toascii __toascii
+#define iscsymf __iscsymf
+#define iscsym  __iscsym
+
+#endif
 #define SIGUSR2 9999
 
 int umask(int);