summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/include/includes.h7
-rwxr-xr-xsource4/script/mkproto.pl6
2 files changed, 9 insertions, 4 deletions
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 29c868ff39..ed8de0607d 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -112,12 +112,13 @@ struct ipv4_addr {
#include "auth/credentials/credentials.h"
#include "libcli/nbt/libnbt.h"
-/***** automatically generated prototypes *****/
-#include "include/proto.h"
-#include "basic.h"
#undef _PRINTF_ATTRIBUTE
#define _PRINTF_ATTRIBUTE(a1, a2)
+/***** automatically generated prototypes *****/
+#include "basic.h"
+#include "include/proto.h"
+
/* String routines */
#include "safe_string.h"
diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl
index 2332cb06ab..9939fe0bf7 100755
--- a/source4/script/mkproto.pl
+++ b/source4/script/mkproto.pl
@@ -72,13 +72,17 @@ sub print_header($$)
my ($file, $header_name) = @_;
print $file "#ifndef $header_name\n";
print $file "#define $header_name\n\n";
+ print $file "#undef _PRINTF_ATTRIBUTE\n";
+ print $file "#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)\n";
print $file "/* This file was automatically generated by mkproto.pl. DO NOT EDIT */\n\n";
}
sub print_footer($$)
{
my ($file, $header_name) = @_;
- printf $file "\n#endif /* %s */\n", $header_name;
+ print $file "#undef _PRINTF_ATTRIBUTE\n";
+ print $file "#define _PRINTF_ATTRIBUTE(a1, a2)\n";
+ print $file "\n#endif /* $header_name */\n\n";
}
sub handle_loadparm($$)