summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-06-01 12:01:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:53:08 -0500
commitc2781df0d5477be58c3189c6d3c17b261d7b8b89 (patch)
tree9866ad20f9b439bbdca4c6ed6191e3f084f75091 /source4/script
parentaec9320dc2fdf03d5187f60749c5f3ad238bf58d (diff)
downloadsamba-c2781df0d5477be58c3189c6d3c17b261d7b8b89.tar.gz
samba-c2781df0d5477be58c3189c6d3c17b261d7b8b89.tar.bz2
samba-c2781df0d5477be58c3189c6d3c17b261d7b8b89.zip
r23289: Provide support for GCC attributes _PURE_, _NONNULL_, _DEPRECATED_, _NORETURN_ and _WARN_UNUSED_RESULT_.
(This used to be commit 44248f662f0b609dad6a7b437948f12d661a28f7)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/mkproto.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/script/mkproto.pl b/source4/script/mkproto.pl
index 1df53dffbb..ebdd803991 100755
--- a/source4/script/mkproto.pl
+++ b/source4/script/mkproto.pl
@@ -180,7 +180,8 @@ sub process_file($$$)
}
next unless ( $is_public || $line =~ /
- (_DEPRECATED_ )?^(void|BOOL|bool|int|struct|char|const|\w+_[tT]\s|uint|unsigned|long|NTSTATUS|
+ (_DEPRECATED_ |_NORETURN_ |_WARN_UNUSED_RESULT_ |_PURE_ )*^(
+ void|BOOL|bool|int|struct|char|const|\w+_[tT]\s|uint|unsigned|long|NTSTATUS|
ADS_STATUS|enum\s.*\(|DATA_BLOB|WERROR|XFILE|FILE|DIR|
double|TDB_CONTEXT|TDB_DATA|TALLOC_CTX|NTTIME|FN_|init_module|
GtkWidget|GType|smb_ucs2_t|krb5_error_code)
@@ -224,6 +225,10 @@ if ($public_file ne $private_file) {
}
public("#ifndef _PUBLIC_\n#define _PUBLIC_\n#endif\n\n");
+public("#ifndef _PURE_\n#define _PURE_\n#endif\n\n");
+public("#ifndef _NORETURN_\n#define _NORETURN_\n#endif\n\n");
+public("#ifndef _DEPRECATED_\n#define _DEPRECATED_\n#endif\n\n");
+public("#ifndef _WARN_UNUSED_RESULT_\n#define _WARN_UNUSED_RESULT_\n#endif\n\n");
process_file(\&public, \&private, $_) foreach (@ARGV);
print_footer(\&public, $public_define);