summaryrefslogtreecommitdiffstats
path: root/source/include/includes.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-08-31 20:20:54 +0000
committerJeremy Allison <jra@samba.org>1998-08-31 20:20:54 +0000
commit3d9ec96de5e04e83abafe9c5d980bd39eee856ea (patch)
tree35400124bfc975c796d7d30e3f002da994181987 /source/include/includes.h
parentd4b714a6be9ccf8a66d7abe0d6d14a810a5f182a (diff)
downloadsamba-3d9ec96de5e04e83abafe9c5d980bd39eee856ea.tar.gz
samba-3d9ec96de5e04e83abafe9c5d980bd39eee856ea.tar.xz
samba-3d9ec96de5e04e83abafe9c5d980bd39eee856ea.zip
configure.in, configure: include/config.h.in: Added stropts and poll.
include/smb.h: Moved old typedefs of uint8 etc. into include/includes.h where all the other defines live (changed them from typedefs to defines). Other changes : changed from using uint32 to SMB_DEV_T and SMB_INO_T in preparation for moving to size independed (ie. 64 bit clean) device and inode access. Stat call wrapper comes next :-). Jeremy.
Diffstat (limited to 'source/include/includes.h')
-rw-r--r--source/include/includes.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/source/include/includes.h b/source/include/includes.h
index 4efa475424b..8b7620e4f97 100644
--- a/source/include/includes.h
+++ b/source/include/includes.h
@@ -260,6 +260,14 @@
#include <compat.h>
#endif
+#ifdef HAVE_STROPTS_H
+#include <stropts.h>
+#endif
+
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
+
#ifndef uchar
#define uchar unsigned char
#endif
@@ -270,6 +278,31 @@
#define schar char
#endif
+/*
+ Samba needs type definitions for int16, int32, uint16 and uint32.
+
+ Normally these are signed and unsigned 16 and 32 bit integers, but
+ they actually only need to be at least 16 and 32 bits
+ respectively. Thus if your word size is 8 bytes just defining them
+ as signed and unsigned int will work.
+*/
+
+#ifndef uint8
+#define uint8 unsigned char
+#endif
+
+#ifndef int16
+#if (SIZEOF_SHORT == 4)
+#define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;
+#else /* SIZEOF_SHORT != 4 */
+#define int16 short
+#endif /* SIZEOF_SHORT != 4 */
+#endif
+
+#ifndef uint16
+#define uint16 unsigned int16
+#endif
+
#ifndef int32
#if (SIZEOF_INT == 4)
#define int32 int
@@ -284,6 +317,18 @@
#define uint32 unsigned int32
#endif
+/*
+ * Type for device and inodes.
+ */
+
+#ifndef SMB_DEV_T
+#define SMB_DEV_T uint32
+#endif
+
+#ifndef SMB_INO_T
+#define SMB_INO_T uint32
+#endif
+
#ifndef MIN
#define MIN(a,b) ((a)<(b)?(a):(b))
#endif