6 headername="_PROTO_H_";
9 print "#ifndef",headername
10 print "#define",headername
11 print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */"
16 print "#endif /* _PROTO_H_ */"
20 if (FILENAME!=current_file) {
21 # if (use_ldap_define)
23 # print "#endif /* USE_LDAP */"
24 # use_ldap_define = 0;
27 print "/* The following definitions come from",FILENAME," */"
32 if (match($0,"[)][ \t]*$")) {
42 # special handling for code merge of TNG to head
43 /^#define OLD_NTDOMAIN 1/ {
44 printf "#if OLD_NTDOMAIN\n"
46 /^#undef OLD_NTDOMAIN/ {
49 /^#define NEW_NTDOMAIN 1/ {
50 printf "#if NEW_NTDOMAIN\n"
52 /^#undef NEW_NTDOMAIN/ {
56 # we handle the loadparm.c fns separately
60 printf "BOOL %s(int );\n", a[2]
65 printf "char **%s(int );\n", a[2]
70 printf "char *%s(int );\n", a[2]
75 printf "int %s(int );\n", a[2]
80 printf "char %s(int );\n", a[2]
85 printf "BOOL %s(void);\n", a[2]
90 printf "char **%s(void);\n", a[2]
95 printf "char *%s(void);\n", a[2]
100 printf "int %s(void);\n", a[2]
103 /^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ {
108 # We have to split up the start
109 # matching as we now have so many start
110 # types that it can cause some versions
111 # of nawk/awk to choke and fail on
112 # the full match. JRA.
117 if( $0 ~ /^const|^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) {
121 if( $0 ~ /^vuser_key|^UNISTR2|^LOCAL_GRP|^DOMAIN_GRP|^SMB_STRUCT_DIRENT|^SEC_ACL|^SEC_DESC|^SEC_DESC_BUF|^DOM_SID|^RPC_HND_NODE|^BYTE/ ) {
125 if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) {
129 if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) {
133 if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T/ ) {