diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-11-01 20:21:54 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:11 -0500 |
commit | 652b8b34f8b326f79771b03e039cfa3c6ba3427e (patch) | |
tree | 3cecbca36a8cb70b54df76c303894c06b7d63953 /source4/include | |
parent | dde06904576dfe01e9710721209650dcff228593 (diff) | |
download | samba-652b8b34f8b326f79771b03e039cfa3c6ba3427e.tar.gz samba-652b8b34f8b326f79771b03e039cfa3c6ba3427e.tar.bz2 samba-652b8b34f8b326f79771b03e039cfa3c6ba3427e.zip |
r3441: some include file cleanups and general housekeeping
(This used to be commit 73ea8ee6c268371d05cf74160f2ad451dd2ae699)
Diffstat (limited to 'source4/include')
-rw-r--r-- | source4/include/includes.h | 166 | ||||
-rw-r--r-- | source4/include/rewrite.h | 22 |
2 files changed, 0 insertions, 188 deletions
diff --git a/source4/include/includes.h b/source4/include/includes.h index b61429edd6..374abc4c37 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -475,120 +475,9 @@ typedef int socklen_t; #endif /* - * Types for devices, inodes and offsets. - */ - -#ifndef SMB_DEV_T -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_DEV64_T) -# define SMB_DEV_T dev64_t -# else -# define SMB_DEV_T dev_t -# endif -#endif - -/* - * Setup the correctly sized inode type. - */ - -#ifndef SMB_INO_T -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_INO64_T) -# define SMB_INO_T ino64_t -# else -# define SMB_INO_T ino_t -# endif -#endif - -#ifndef LARGE_SMB_INO_T -# if (defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_INO64_T)) || (defined(SIZEOF_INO_T) && (SIZEOF_INO_T == 8)) -# define LARGE_SMB_INO_T 1 -# endif -#endif - -#ifdef LARGE_SMB_INO_T -#define SINO_T(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) -#else -#define SINO_T(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0)) -#endif - -#ifndef SMB_OFF_T -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) -# define SMB_OFF_T off64_t -# else -# define SMB_OFF_T off_t -# endif -#endif - -/* - * Set the define that tells us if we can do 64 bit - * NT SMB calls. - */ - -#ifndef LARGE_SMB_OFF_T -# if (defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T)) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)) -# define LARGE_SMB_OFF_T 1 -# endif -#endif - -/* * Type for stat structure. */ -#ifndef SMB_STRUCT_STAT -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STAT64) && defined(HAVE_OFF64_T) -# define SMB_STRUCT_STAT struct stat64 -# else -# define SMB_STRUCT_STAT struct stat -# endif -#endif - -/* - * Type for dirent structure. - */ - -#ifndef SMB_STRUCT_DIRENT -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_DIRENT64) -# define smb_dirent dirent64 -# else -# define smb_dirent dirent -# endif -#endif - -/* - * Defines for 64 bit fcntl locks. - */ - -#ifndef SMB_STRUCT_FLOCK -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_STRUCT_FLOCK struct flock64 -# else -# define SMB_STRUCT_FLOCK struct flock -# endif -#endif - -#ifndef SMB_F_SETLKW -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_F_SETLKW F_SETLKW64 -# else -# define SMB_F_SETLKW F_SETLKW -# endif -#endif - -#ifndef SMB_F_SETLK -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_F_SETLK F_SETLK64 -# else -# define SMB_F_SETLK F_SETLK -# endif -#endif - -#ifndef SMB_F_GETLK -# if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_FLOCK64) && defined(HAVE_OFF64_T) -# define SMB_F_GETLK F_GETLK64 -# else -# define SMB_F_GETLK F_GETLK -# endif -#endif - #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) #endif @@ -970,55 +859,12 @@ int vasprintf(char **ptr, const char *format, va_list ap); #define LOG_DEBUG 7 /* debug-level messages */ #endif -/* NetBSD doesn't have these */ -#ifndef SHM_R -#define SHM_R 0400 -#endif - -#ifndef SHM_W -#define SHM_W 0200 -#endif - -#if HAVE_KERNEL_SHARE_MODES -#ifndef LOCK_MAND -#define LOCK_MAND 32 /* This is a mandatory flock */ -#define LOCK_READ 64 /* ... Which allows concurrent read operations */ -#define LOCK_WRITE 128 /* ... Which allows concurrent write operations */ -#define LOCK_RW 192 /* ... Which allows concurrent read & write ops */ -#endif -#endif - extern int DEBUGLEVEL; -#define MAX_SEC_CTX_DEPTH 8 /* Maximum number of security contexts */ - - -#ifdef GLIBC_HACK_FCNTL64 -/* this is a gross hack. 64 bit locking is completely screwed up on - i386 Linux in glibc 2.1.95 (which ships with RedHat 7.0). This hack - "fixes" the problem with the current 2.4.0test kernels -*/ -#define fcntl fcntl64 -#undef F_SETLKW -#undef F_SETLK -#define F_SETLK 13 -#define F_SETLKW 14 -#endif - - -/* Needed for sys_dlopen/sys_dlsym/sys_dlclose */ -#ifndef RTLD_GLOBAL -#define RTLD_GLOBAL 0 -#endif - #ifndef RTLD_LAZY #define RTLD_LAZY 0 #endif -#ifndef RTLD_NOW -#define RTLD_NOW 0 -#endif - /* needed for some systems without iconv. Doesn't really matter what error code we use */ #ifndef EILSEQ @@ -1026,9 +872,6 @@ extern int DEBUGLEVEL; #endif /* add varargs prototypes with printf checking */ -int fdprintf(int , const char *, ...) PRINTF_ATTRIBUTE(2,3); -int d_printf(const char *, ...) PRINTF_ATTRIBUTE(1,2); -int d_fprintf(FILE *f, const char *, ...) PRINTF_ATTRIBUTE(2,3); #ifndef HAVE_SNPRINTF_DECL int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4); #endif @@ -1036,19 +879,10 @@ int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4); int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #endif -void sys_adminlog(int priority, const char *format_str, ...) PRINTF_ATTRIBUTE(2,3); - -int pstr_sprintf(pstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); -int fstr_sprintf(fstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); - -int d_vfprintf(FILE *f, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0); - -int smb_xvasprintf(char **ptr, const char *format, va_list ap) PRINTF_ATTRIBUTE(2,0); /* we used to use these fns, but now we have good replacements for snprintf and vsnprintf */ #define slprintf snprintf -#define vslprintf vsnprintf /* we need to use __va_copy() on some platforms */ diff --git a/source4/include/rewrite.h b/source4/include/rewrite.h index 584cc215f9..b26c8f2e5d 100644 --- a/source4/include/rewrite.h +++ b/source4/include/rewrite.h @@ -82,28 +82,6 @@ typedef int BOOL; #define LEVEL_II_OPLOCK_BREAK_CMD 0x3 #define ASYNC_LEVEL_II_OPLOCK_BREAK_CMD 0x4 -/* - * Capabilities abstracted for different systems. - */ - -#define KERNEL_OPLOCK_CAPABILITY 0x1 - -/* - * Oplock break command code sent via the kernel interface (if it exists). - * - * Form of this is : - * - * 0 2 2+devsize 2+devsize+inodesize - * +----+--------+--------+----------+ - * | cmd| dev | inode | fileid | - * +----+--------+--------+----------+ - */ -#define KERNEL_OPLOCK_BREAK_DEV_OFFSET 2 -#define KERNEL_OPLOCK_BREAK_INODE_OFFSET (KERNEL_OPLOCK_BREAK_DEV_OFFSET + sizeof(SMB_DEV_T)) -#define KERNEL_OPLOCK_BREAK_FILEID_OFFSET (KERNEL_OPLOCK_BREAK_INODE_OFFSET + sizeof(SMB_INO_T)) -#define KERNEL_OPLOCK_BREAK_MSG_LEN (KERNEL_OPLOCK_BREAK_FILEID_OFFSET + sizeof(unsigned long)) - - #define CMD_REPLY 0x8000 #include "smb_macros.h" |