summaryrefslogtreecommitdiff
path: root/lib/sbin/create_c_stuff.pl
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-01-29 18:50:02 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-01-29 18:50:02 +0000
commit47383b5d265b46142c8de75c177bfdbd9b0ddb91 (patch)
treed8a39782b738e16852040795df4f4df3082ba62f /lib/sbin/create_c_stuff.pl
parente7e7ed70c4bfc1ff3713aec6eafb386de2de5161 (diff)
Added a dummy variable to a structure if it would otherwise be empty.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@148 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/create_c_stuff.pl')
-rw-r--r--lib/sbin/create_c_stuff.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/sbin/create_c_stuff.pl b/lib/sbin/create_c_stuff.pl
index 9256463a..eec85f95 100644
--- a/lib/sbin/create_c_stuff.pl
+++ b/lib/sbin/create_c_stuff.pl
@@ -67,6 +67,12 @@ sub CreateParameterBindingFile
push(@data, $line);
}
+ # Some compilers don't like an empty structure.
+ if((keys %parameters) == 0)
+ {
+ push(@data, " int dummy_parameter;");
+ }
+
push(@data, "} $structure;");
push(@data, "");
@@ -348,6 +354,12 @@ sub CreateCStructureParameterHeader
push(@definition, $line)
}
+ # Some compilers don't like an empty structure.
+ if((keys %parameters) == 0)
+ {
+ push(@data, " int dummy_parameter;");
+ }
+
push(@data, "} $structure;");
push(@data, "");