summaryrefslogtreecommitdiffstats
path: root/source4/heimdal/cf
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-01-12 18:16:45 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-03-27 11:51:27 +1100
commit89eaef025376339ef25d07cdc4748920fceaa968 (patch)
treef514f4632c9d54a372a7f1f0ca845a0c3a488fbf /source4/heimdal/cf
parentfac8ca52ade6e490eea3cf3d0fc98287da321c13 (diff)
downloadsamba-89eaef025376339ef25d07cdc4748920fceaa968.tar.gz
samba-89eaef025376339ef25d07cdc4748920fceaa968.tar.xz
samba-89eaef025376339ef25d07cdc4748920fceaa968.zip
s4:heimdal: import lorikeet-heimdal-201001120029 (commit a5e675fed7c5db8a7370b77ed0bfa724196aa84d)
Diffstat (limited to 'source4/heimdal/cf')
-rw-r--r--source4/heimdal/cf/make-proto.pl23
1 files changed, 18 insertions, 5 deletions
diff --git a/source4/heimdal/cf/make-proto.pl b/source4/heimdal/cf/make-proto.pl
index 04733e1281..12c6d07f5e 100644
--- a/source4/heimdal/cf/make-proto.pl
+++ b/source4/heimdal/cf/make-proto.pl
@@ -253,8 +253,14 @@ $private_h_trailer = "";
foreach(sort keys %funcs){
if(/^(main)$/) { next }
+ if ($funcs{$_} =~ /\^/) {
+ $beginblock = "#ifdef __BLOCKS__\n";
+ $endblock = "#endif /* __BLOCKS__ */\n";
+ } else {
+ $beginblock = $endblock = "";
+ }
if(!defined($exported{$_}) && /$private_func_re/) {
- $private_h .= $funcs{$_} . "\n\n";
+ $private_h .= $beginblock . $funcs{$_} . "\n" . $endblock . "\n";
if($funcs{$_} =~ /__attribute__/) {
$private_attribute_seen = 1;
}
@@ -267,7 +273,7 @@ foreach(sort keys %funcs){
$public_h .= "#ifndef HAVE_$fupper\n";
}
}
- $public_h .= $funcs{$_} . "\n";
+ $public_h .= $beginblock . $funcs{$_} . "\n" . $endblock;
if($funcs{$_} =~ /__attribute__/) {
$public_attribute_seen = 1;
}
@@ -310,26 +316,33 @@ extern \"C\" {
}
if ($opt_E) {
$public_h_header .= "#ifndef $opt_E
+#ifndef ${opt_E}_FUNCTION
#if defined(_WIN32)
-#define ${opt_E}_FUNCTION __stdcall __declspec(dllimport)
+#define ${opt_E}_FUNCTION __declspec(dllimport)
+#define ${opt_E}_CALL __stdcall
#define ${opt_E}_VARIABLE __declspec(dllimport)
#else
#define ${opt_E}_FUNCTION
+#define ${opt_E}_CALL
#define ${opt_E}_VARIABLE
#endif
#endif
-
+#endif
";
$private_h_header .= "#ifndef $opt_E
+#ifndef ${opt_E}_FUNCTION
#if defined(_WIN32)
-#define ${opt_E}_FUNCTION __stdcall __declspec(dllimport)
+#define ${opt_E}_FUNCTION __declspec(dllimport)
+#define ${opt_E}_CALL __stdcall
#define ${opt_E}_VARIABLE __declspec(dllimport)
#else
#define ${opt_E}_FUNCTION
+#define ${opt_E}_CALL
#define ${opt_E}_VARIABLE
#endif
#endif
+#endif
";
}