Changeset 745 for trunk/server/source3/include/includes.h
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/include/includes.h
r414 r745 23 23 #include "../replace/replace.h" 24 24 25 #if _SAMBA_BUILD_ == 4 26 # undef _SAMBA_BUILD_ 27 # define _SAMBA_BUILD_ 3 28 #endif 29 25 30 /* make sure we have included the correct config.h */ 26 31 #ifndef NO_CONFIG_H /* for some tests */ … … 35 40 still have comflicts with their header files (e.g. IRIX 6.4) */ 36 41 37 #if !defined(__cplusplus) && defined(DEVELOPER) 42 #if !defined(__cplusplus) && defined(DEVELOPER) && defined(__linux__) 38 43 #define class #error DONT_USE_CPLUSPLUS_RESERVED_NAMES 39 44 #define private #error DONT_USE_CPLUSPLUS_RESERVED_NAMES … … 49 54 #include "local.h" 50 55 51 #ifdef AIX52 #define DEFAULT_PRINTING PRINT_AIX53 #define PRINTCAP_NAME "/etc/qconfig"54 #endif55 56 #ifdef HPUX57 #define DEFAULT_PRINTING PRINT_HPUX58 #endif59 60 #ifdef QNX61 #define DEFAULT_PRINTING PRINT_QNX62 #endif63 64 56 #ifdef SUNOS4 65 57 /* on SUNOS4 termios.h conflicts with sys/ioctl.h */ … … 77 69 #endif /* RELIANTUNIX */ 78 70 79 #include "system/capability.h"80 71 #include "system/dir.h" 81 #include "system/filesys.h"82 #include "system/glob.h"83 #include "system/iconv.h"84 72 #include "system/locale.h" 85 #include "system/network.h"86 #include "system/passwd.h"87 #include "system/readline.h"88 #include "system/select.h"89 #include "system/shmem.h"90 #include "system/syslog.h"91 #include "system/terminal.h"92 73 #include "system/time.h" 93 74 #include "system/wait.h" … … 146 127 #endif 147 128 148 #if HAVE_LBER_H 149 #include <lber.h> 150 #if defined(HPUX) && !defined(_LBER_TYPES_H) 151 /* Define ber_tag_t and ber_int_t for using 152 * HP LDAP-UX Integration products' LDAP libraries. 153 */ 154 #ifndef ber_tag_t 155 typedef unsigned long ber_tag_t; 156 typedef int ber_int_t; 157 #endif 158 #endif /* defined(HPUX) && !defined(_LBER_TYPES_H) */ 159 #ifndef LBER_USE_DER 160 #define LBER_USE_DER 0x01 161 #endif 162 #endif 163 164 #if HAVE_LDAP_H 165 #include <ldap.h> 166 #ifndef LDAP_CONST 167 #define LDAP_CONST const 168 #endif 169 #ifndef LDAP_OPT_SUCCESS 170 #define LDAP_OPT_SUCCESS 0 171 #endif 172 /* Solaris 8 and maybe other LDAP implementations spell this "..._INPROGRESS": */ 173 #if defined(LDAP_SASL_BIND_INPROGRESS) && !defined(LDAP_SASL_BIND_IN_PROGRESS) 174 #define LDAP_SASL_BIND_IN_PROGRESS LDAP_SASL_BIND_INPROGRESS 175 #endif 176 /* Solaris 8 defines SSL_LDAP_PORT, not LDAPS_PORT and it only does so if 177 LDAP_SSL is defined - but SSL is not working. We just want the 178 port number! Let's just define LDAPS_PORT correct. */ 179 #if !defined(LDAPS_PORT) 180 #define LDAPS_PORT 636 181 #endif 182 #else 129 #ifndef HAVE_LDAP_H 183 130 #undef HAVE_LDAP 184 #endif185 186 #if HAVE_GSSAPI_GSSAPI_H187 #include <gssapi/gssapi.h>188 #elif HAVE_GSSAPI_GSSAPI_GENERIC_H189 #include <gssapi/gssapi_generic.h>190 #elif HAVE_GSSAPI_H191 #include <gssapi.h>192 #endif193 194 #if HAVE_COM_ERR_H195 #include <com_err.h>196 131 #endif 197 132 … … 237 172 #if defined(HAVE_AIO_H) && defined(WITH_AIO) 238 173 #include <aio.h> 239 #endif240 241 #ifdef WITH_MADVISE_PROTECTED242 #include <sys/mman.h>243 174 #endif 244 175 … … 252 183 #endif 253 184 254 /* If we have --enable-developer and the valgrind header is present,255 * then we're OK to use it. Set a macro so this logic can be done only256 * once. */257 #if defined(DEVELOPER)258 #if (HAVE_VALGRIND_H || HAVE_VALGRIND_VALGRIND_H)259 #define VALGRIND260 #endif261 #endif262 263 264 185 /* we support ADS if we want it and have krb5 and ldap libs */ 265 186 #if defined(WITH_ADS) && defined(HAVE_KRB5) && defined(HAVE_LDAP) … … 384 305 385 306 #ifdef LARGE_SMB_INO_T 386 #define SINO_T_VAL(p, ofs, v) (SIVAL((p),(ofs),(v)&0xFFFFFFFF), SIVAL((p),(ofs)+4,(v)>>32))387 #define INO_T_VAL(p, ofs) ((SMB_INO_T) (((uint64_t)(IVAL(p,ofs)))| (((uint64_t)(IVAL(p,(ofs)+4))) << 32)))307 #define SINO_T_VAL(p, ofs, v) SBVAL(p, ofs, v) 308 #define INO_T_VAL(p, ofs) ((SMB_INO_T)BVAL(p, ofs)) 388 309 #else 389 #define SINO_T_VAL(p, ofs, v) (SIVAL(p,ofs,v),SIVAL(p,(ofs)+4,0))310 #define SINO_T_VAL(p, ofs, v) SBVAL(p, ofs, ((uint64_t)(v)) & UINT32_MAX) 390 311 #define INO_T_VAL(p, ofs) ((SMB_INO_T)(IVAL((p),(ofs)))) 391 312 #endif … … 399 320 #endif 400 321 401 #define SBIG_UINT(p, ofs, v) (SIVAL(p,ofs,(v)&0xFFFFFFFF), SIVAL(p,(ofs)+4,(v)>>32)) 402 #define BIG_UINT(p, ofs) ((((uint64_t) IVAL(p,(ofs)+4))<<32)|IVAL(p,ofs)) 403 #define IVAL2_TO_SMB_BIG_UINT(buf,off) ( (((uint64_t)(IVAL((buf),(off)))) & ((uint64_t)0xFFFFFFFF)) | \ 404 (( ((uint64_t)(IVAL((buf),(off+4)))) & ((uint64_t)0xFFFFFFFF) ) << 32 ) ) 405 322 /* TODO: remove this macros */ 323 #define SBIG_UINT(p, ofs, v) SBVAL(p, ofs, v) 324 #define BIG_UINT(p, ofs) BVAL(p, ofs) 325 #define IVAL2_TO_SMB_BIG_UINT(p, ofs) BVAL(p, ofs) 406 326 407 327 /* this should really be a 64 bit type if possible */ … … 553 473 #endif 554 474 555 #ifndef HAVE_STRUCT_TIMESPEC556 struct timespec {557 time_t tv_sec; /* Seconds. */558 long tv_nsec; /* Nanoseconds. */559 };560 #endif561 562 475 enum timestamp_set_resolution { 563 476 TIMESTAMP_SET_SECONDS = 0, … … 565 478 TIMESTAMP_SET_NT_OR_BETTER 566 479 }; 567 568 #ifdef HAVE_BROKEN_GETGROUPS569 #define GID_T int570 #else571 #define GID_T gid_t572 #endif573 574 #ifndef NGROUPS_MAX575 #define NGROUPS_MAX 32 /* Guess... */576 #endif577 480 578 481 /* Our own fstrings */ … … 600 503 #endif 601 504 602 /* Samba 3 doesn't use iconv_convenience: */603 extern void *cmdline_lp_ctx;604 struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);605 606 505 /* Lists, trees, caching, database... */ 607 506 #include "../lib/util/util.h" … … 610 509 #include "../lib/util/memory.h" 611 510 #include "../lib/util/attr.h" 612 #include " intl.h"511 #include "../lib/util/tsort.h" 613 512 #include "../lib/util/dlinklist.h" 614 #include "tdb.h" 615 #include "util_tdb.h" 616 617 #include "talloc.h" 513 514 #include <talloc.h> 618 515 619 516 #include "event.h" 620 #include "../lib/util/tevent_unix.h"621 #include "../lib/util/tevent_ntstatus.h"622 #include "../lib/tsocket/tsocket.h"623 517 624 518 #include "../lib/util/data_blob.h" 625 519 #include "../lib/util/time.h" 626 #include "../lib/util/asn1.h" 627 628 #include "ads.h" 629 #include "ads_dns.h" 630 #include "interfaces.h" 631 #include "trans2.h" 520 #include "../lib/util/debug.h" 521 #include "../lib/util/debug_s3.h" 522 523 #include "../libcli/util/ntstatus.h" 632 524 #include "../libcli/util/error.h" 633 #include "ntioctl.h"634 525 #include "../lib/util/charset/charset.h" 635 526 #include "dynconfig.h" 636 #include "util_getent.h"637 #include "debugparse.h"638 #include "privileges.h"639 #include "messages.h"640 527 #include "locking.h" 641 528 #include "smb_perfcount.h" 642 #include "smb_signing.h"643 529 #include "smb.h" 644 #include "nameserv.h"645 #include "secrets.h"646 530 #include "../lib/util/byteorder.h" 647 #include "privileges.h" 648 #include "rpc_misc.h" 649 #include "rpc_dce.h" 650 #include "../librpc/gen_ndr/schannel.h" 651 #include "mapping.h" 652 #include "passdb.h" 653 #include "rpc_secdes.h" 654 #include "../libgpo/gpo.h" 655 #include "msdfs.h" 656 #include "rap.h" 657 #include "../lib/crypto/md5.h" 658 #include "../lib/crypto/md4.h" 659 #include "../lib/crypto/arcfour.h" 660 #include "../lib/crypto/crc32.h" 661 #include "../lib/crypto/hmacmd5.h" 662 #include "ntlmssp.h" 663 #include "auth.h" 664 #include "ntdomain.h" 665 #include "reg_objects.h" 666 #include "reg_db.h" 667 #include "librpc/gen_ndr/perfcount.h" 668 #include "librpc/gen_ndr/notify.h" 669 #include "librpc/gen_ndr/xattr.h" 670 #include "librpc/gen_ndr/messaging.h" 671 #include "librpc/gen_ndr/ndr_nbt.h" 672 #include "librpc/rpc/dcerpc.h" 673 #include "nt_printing.h" 674 #include "idmap.h" 675 #include "client.h" 676 677 #include "session.h" 678 #include "popt.h" 679 #include "mangle.h" 531 680 532 #include "module.h" 681 #include "nsswitch/winbind_client.h"682 #include "dbwrap.h"683 #include "packet.h"684 #include "ctdbd_conn.h"685 533 #include "../lib/util/talloc_stack.h" 686 #include "memcache.h"687 #include "async_smb.h"688 #include "../lib/async_req/async_sock.h"689 #include "talloc_dict.h"690 #include "services.h"691 #include "eventlog.h"692 534 #include "../lib/util/smb_threads.h" 693 535 #include "../lib/util/smb_threads_internal.h" 694 #include "tldap.h"695 #include "tldap_util.h"696 697 #include "lib/smbconf/smbconf.h"698 #include "lib/smbconf/smbconf_init.h"699 #include "lib/smbconf/smbconf_reg.h"700 #include "lib/smbconf/smbconf_txt.h"701 702 /* Defines for wisXXX functions. */703 #define UNI_UPPER 0x1704 #define UNI_LOWER 0x2705 #define UNI_DIGIT 0x4706 #define UNI_XDIGIT 0x8707 #define UNI_SPACE 0x10708 709 #include "nsswitch/winbind_nss.h"710 711 /* forward declaration from printing.h to get around712 header file dependencies */713 714 struct printjob;715 716 /* forward declarations from smbldap.c */717 718 #include "smbldap.h"719 720 /*721 * Reasons for cache flush.722 */723 724 enum flush_reason_enum {725 SEEK_FLUSH,726 READ_FLUSH,727 WRITE_FLUSH,728 READRAW_FLUSH,729 OPLOCK_RELEASE_FLUSH,730 CLOSE_FLUSH,731 SYNC_FLUSH,732 SIZECHANGE_FLUSH,733 /* NUM_FLUSH_REASONS must remain the last value in the enumeration. */734 NUM_FLUSH_REASONS};735 736 #include "nss_info.h"737 #include "modules/nfs4_acls.h"738 #include "nsswitch/libwbclient/wbclient.h"739 536 740 537 /***** prototypes *****/ … … 742 539 #include "proto.h" 743 540 #endif 744 #include "libcli/security/secace.h"745 #include "libcli/security/secacl.h"746 #include "libcli/security/security_descriptor.h"747 748 #if defined(HAVE_POSIX_ACLS)749 #include "modules/vfs_posixacl.h"750 #endif751 752 #if defined(HAVE_TRU64_ACLS)753 #include "modules/vfs_tru64acl.h"754 #endif755 756 #if defined(HAVE_SOLARIS_ACLS) || defined(HAVE_UNIXWARE_ACLS)757 #include "modules/vfs_solarisacl.h"758 #endif759 760 #if defined(HAVE_HPUX_ACLS)761 #include "modules/vfs_hpuxacl.h"762 #endif763 764 #if defined(HAVE_IRIX_ACLS)765 #include "modules/vfs_irixacl.h"766 #endif767 768 #ifdef HAVE_LDAP769 #include "ads_protos.h"770 #endif771 772 /* We need this after proto.h to reference GetTimeOfDay(). */773 #include "smbprofile.h"774 541 775 542 /* String routines */ … … 778 545 #include "safe_string.h" 779 546 780 /* prototypes from lib/util_transfer_file.c */781 #include "transfer_file.h"782 783 #ifndef DEFAULT_PRINTING784 #ifdef HAVE_CUPS785 #define DEFAULT_PRINTING PRINT_CUPS786 #define PRINTCAP_NAME "cups"787 #elif defined(SYSV)788 #define DEFAULT_PRINTING PRINT_SYSV789 #define PRINTCAP_NAME "lpstat"790 #else791 #define DEFAULT_PRINTING PRINT_BSD792 #define PRINTCAP_NAME "/etc/printcap"793 #endif794 #endif795 796 #ifndef PRINTCAP_NAME797 #define PRINTCAP_NAME "/etc/printcap"798 #endif799 800 547 #ifndef SIGCLD 801 548 #define SIGCLD SIGCHLD … … 806 553 #endif 807 554 808 #ifndef MAP_FILE809 #define MAP_FILE 0810 #endif811 812 555 #if defined(HAVE_PUTPRPWNAM) && defined(AUTH_CLEARTEXT_SEG_CHARS) 813 556 #define OSF1_ENH_SEC 1 814 #endif815 816 #ifndef ALLOW_CHANGE_PASSWORD817 #if (defined(HAVE_TERMIOS_H) && defined(HAVE_DUP2) && defined(HAVE_SETSID))818 #define ALLOW_CHANGE_PASSWORD 1819 #endif820 #endif821 822 /* what is the longest significant password available on your system?823 Knowing this speeds up password searches a lot */824 #ifndef PASSWORD_LENGTH825 #define PASSWORD_LENGTH 8826 #endif827 828 #ifndef HAVE_PIPE829 #define SYNC_DNS 1830 557 #endif 831 558 … … 851 578 #endif 852 579 853 854 #if HAVE_KERNEL_SHARE_MODES855 #ifndef LOCK_MAND856 #define LOCK_MAND 32 /* This is a mandatory flock */857 #define LOCK_READ 64 /* ... Which allows concurrent read operations */858 #define LOCK_WRITE 128 /* ... Which allows concurrent write operations */859 #define LOCK_RW 192 /* ... Which allows concurrent read & write ops */860 #endif861 #endif862 863 extern int DEBUGLEVEL;864 580 865 581 #define MAX_SEC_CTX_DEPTH 8 /* Maximum number of security contexts */ … … 879 595 880 596 881 /* needed for some systems without iconv. Doesn't really matter882 what error code we use */883 #ifndef EILSEQ884 #define EILSEQ EIO885 #endif886 887 597 /* add varargs prototypes with printf checking */ 888 598 /*PRINTFLIKE2 */ … … 922 632 #endif 923 633 924 #ifdef HAVE_LDAP925 926 /* function declarations not included in proto.h */927 LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);928 929 #endif /* HAVE_LDAP */930 931 #if defined(HAVE_LINUX_READAHEAD) && ! defined(HAVE_READAHEAD_DECL)932 ssize_t readahead(int fd, off64_t offset, size_t count);933 #endif934 935 634 #ifdef TRUE 936 635 #undef TRUE … … 960 659 void exit_server_fault(void) _NORETURN_; 961 660 962 #ifdef HAVE_LIBNSCD963 #include "libnscd.h"964 #endif965 966 #if defined(HAVE_IPV6)967 void in6_addr_to_sockaddr_storage(struct sockaddr_storage *ss,968 struct in6_addr ip);969 #endif970 971 661 /* samba3 doesn't use uwrap yet */ 972 662 #define uwrap_enabled() 0 973 663 664 #define BASE_RID (0x000003E8L) 665 974 666 #endif /* _INCLUDES_H */
Note:
See TracChangeset
for help on using the changeset viewer.