summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@src.gnome.org>1999-05-27 21:04:32 +0000
committerRaja R Harinath <harinath@src.gnome.org>1999-05-27 21:04:32 +0000
commit7cb04608d303797d3ba0aad728e571ae888d871e (patch)
tree889dc1051f43a8aa95dd97daf2c07a95eccb0d78
parent531ee24d48ce1e0cb23791b5b1da63a8f09814d6 (diff)
downloadshared-mime-info-7cb04608d303797d3ba0aad728e571ae888d871e.tar.gz
Put c++ guards after #includes.
* gnomesupport.awk: Put c++ guards after #includes. * gnomesupport-fake.h: Remove dependence on `gnome-argp.h'. Move relevant declarations here. svn path=/trunk/; revision=810
-rw-r--r--support/ChangeLog7
-rw-r--r--support/gnomesupport-fake.h9
-rw-r--r--support/gnomesupport.awk11
3 files changed, 20 insertions, 7 deletions
diff --git a/support/ChangeLog b/support/ChangeLog
index b18c029c..13a97c48 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,10 @@
+1999-05-27 Raja R Harinath <harinath@cs.umn.edu>
+
+ * gnomesupport.awk: Put c++ guards after #includes.
+
+ * gnomesupport-fake.h: Remove dependence on `gnome-argp.h'. Move
+ relevant declarations here.
+
1999-05-12 Martin Baulig <martin@home-of-linux.org>
* canonicalize.c: Use `set_errno' instead of `__set_errno' and
diff --git a/support/gnomesupport-fake.h b/support/gnomesupport-fake.h
index a6423d09..3431ce92 100644
--- a/support/gnomesupport-fake.h
+++ b/support/gnomesupport-fake.h
@@ -11,7 +11,10 @@
#include <gnomesupport.h>
-#include <gnome-argp.h>
+/* Some systems, like Red Hat 4.0, define these but don't declare
+ them. Hopefully it is safe to always declare them here. */
+extern char *program_invocation_short_name;
+extern char *program_invocation_name;
/* Override some of config.h.
Gnomesupport provides the replacements for these, so you actually
@@ -25,4 +28,8 @@
# define HAVE_PROGRAM_INVOCATION_NAME 1
#endif
+#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
+# define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1
+#endif
+
#endif /* GNOMESUPPORT_FAKE_H_ */
diff --git a/support/gnomesupport.awk b/support/gnomesupport.awk
index 7e318b00..2f89ab6a 100644
--- a/support/gnomesupport.awk
+++ b/support/gnomesupport.awk
@@ -8,10 +8,6 @@ BEGIN {
print "#ifndef GNOMESUPPORT_H";
print "#define GNOMESUPPORT_H";
print "";
- print "#ifdef __cplusplus";
- print "extern \"C\" {";
- print "#endif /* __cplusplus */";
- print "";
print "#include <stddef.h> /* for size_t */";
}
@@ -20,12 +16,10 @@ BEGIN {
END {
if (!def["HAVE_VASPRINTF"] || !def["HAVE_VSNPRINTF"]) {
- print "";
print "#include <stdarg.h>";
}
if (!def["HAVE_SCANDIR"] || def["NEED_DECLARATION_SCANDIR"]) {
- print "";
print "#include <sys/types.h>";
if (def["HAVE_DIRENT_H"]) {
@@ -44,6 +38,11 @@ END {
}
}
+ print "";
+ print "#ifdef __cplusplus";
+ print "extern \"C\" {";
+ print "#endif /* __cplusplus */";
+
if (def["NEED_DECLARATION_GETHOSTNAME"]) {
print "";
print "/* Get name of current host. */";