diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/includes.h | 12 | ||||
-rw-r--r-- | source3/include/proto.h | 17 | ||||
-rw-r--r-- | source3/include/smb.h | 5 |
3 files changed, 21 insertions, 13 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h index 09c687aed5..91a2ec5c67 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -214,6 +214,9 @@ Here come some platform specific sections #include <dirent.h> #include <string.h> #include <sys/vfs.h> +#include <sys/ipc.h> +#include <sys/sem.h> +#include <sys/shm.h> #include <netinet/in.h> #ifndef NO_ASMSIGNALH #include <asm/signal.h> @@ -233,6 +236,7 @@ Here come some platform specific sections #define HAVE_MEMMOVE #define USE_SIGPROCMASK #define USE_WAITPID +#define USE_SYSV_IPC #if 0 /* SETFS disabled until we can check on some bug reports */ #if _LINUX_C_LIB_VERSION_MAJOR >= 5 @@ -293,6 +297,9 @@ typedef unsigned short mode_t; #include <sys/statvfs.h> #include <sys/filio.h> #include <sys/sockio.h> +#include <sys/ipc.h> +#include <sys/sem.h> +#include <sys/shm.h> #include <netinet/in_systm.h> #include <netinet/tcp.h> #include <netinet/ip.h> @@ -317,6 +324,7 @@ extern int innetgr (const char *, const char *, const char *, const char *); #define USE_STATVFS #define USE_GETCWD #define USE_SETSID +#define USE_SYSV_IPC #ifndef REPLACE_GETPASS #define REPLACE_GETPASS #endif /* REPLACE_GETPASS */ @@ -548,6 +556,9 @@ char *mktemp(char *); /* No standard include */ #include <sys/types.h> #include <sys/termios.h> #include <netinet/tcp.h> +#include <sys/ipc.h> +#include <sys/sem.h> +#include <sys/shm.h> #ifdef HPUX_10_TRUSTED #include <hpsecurity.h> #include <prot.h> @@ -563,6 +574,7 @@ char *mktemp(char *); /* No standard include */ #define USE_GETCWD #define USE_SETSID #define USE_SETRES +#define USE_SYSV_IPC #define DEFAULT_PRINTING PRINT_HPUX /* Ken Weiss <krweiss@ucdavis.edu> tells us that SIGCLD_IGNORE is not good for HPUX */ diff --git a/source3/include/proto.h b/source3/include/proto.h index 669ed5fd8d..13368c873d 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -878,18 +878,11 @@ int construct_reply(char *inbuf,char *outbuf,int size,int bufsize); /*The following definitions come from shmem.c */ -BOOL smb_shm_open(char *file_name, int size, int ronly); -BOOL smb_shm_close( void ); -int smb_shm_alloc(int size); -BOOL smb_shm_free(int offset); -int smb_shm_get_userdef_off(void); -void *smb_shm_offset2addr(int offset); -int smb_shm_addr2offset(void *addr); -BOOL smb_shm_lock_hash_entry( unsigned int entry); -BOOL smb_shm_unlock_hash_entry( unsigned int entry ); -BOOL smb_shm_get_usage(int *bytes_free, - int *bytes_used, - int *bytes_overhead); +struct shmem_ops *smb_shm_open(char *file_name, int size, int ronly); + +/*The following definitions come from shmem_sysv.c */ + +struct shmem_ops *sysv_shm_open(int size, int ronly); /*The following definitions come from smbdes.c */ diff --git a/source3/include/smb.h b/source3/include/smb.h index 057a0b7550..d7a576de85 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -46,8 +46,12 @@ /* Default number of hash buckets used in shared memory share mode */ #ifndef SHMEM_HASH_SIZE +#ifdef SEMMSL +#define SHMEM_HASH_SIZE (SEMMSL-1) +#else #define SHMEM_HASH_SIZE 113 #endif +#endif #define NMB_PORT 137 #define DGRAM_PORT 138 @@ -1328,7 +1332,6 @@ struct share_ops { /* each implementation of the shared memory code needs to support the following operations */ struct shmem_ops { - BOOL (*open)(char *, int ); BOOL (*close)( void ); int (*alloc)(int ); BOOL (*free)(int ); |