about summary refs log tree commit diff
path: root/pm_config.in.h
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-10-01 20:56:15 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-10-01 20:56:15 +0000
commit9184208ec40610f6856907fa00d814ae093d3e3b (patch)
tree8566240342f5d4e935e1953f4932906dcadd13e7 /pm_config.in.h
parent1ef976008e8a31d952047e7585b28e324c2e1f7b (diff)
downloadnetpbm-mirror-9184208ec40610f6856907fa00d814ae093d3e3b.tar.gz
netpbm-mirror-9184208ec40610f6856907fa00d814ae093d3e3b.tar.xz
netpbm-mirror-9184208ec40610f6856907fa00d814ae093d3e3b.zip
Fix multiple function definitions for Irix compiler
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@81 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'pm_config.in.h')
-rw-r--r--pm_config.in.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/pm_config.in.h b/pm_config.in.h
index 9fc55351..1956f5d3 100644
--- a/pm_config.in.h
+++ b/pm_config.in.h
@@ -222,6 +222,26 @@ extern int write();
   #endif
 #endif
 
+/* At least one compiler can't handle two declarations of the same function
+   that aren't literally identical.  E.g. "static foo_fn_t foo1;" conflicts
+   with "static void foo1(int);" even if type 'foo_fn_t' is defined as
+   void(int).  (The compiler we saw do this is SGI IDO cc (for IRIX 4.3)).
+
+   LITERAL_FN_DEF_MATCH says that the compiler might have this problem,
+   so one must be conservative in redeclaring functions.
+*/
+#if defined(__GNUC__)
+  #define LITERAL_FN_DEF_MATCH 0
+#else
+  #if (defined(__sgi))
+    #define LITERAL_FN_DEF_MATCH 1
+  #else   
+    #define LITERAL_FN_DEF_MATCH 0
+  #endif
+#endif
+
+
+
 /* CONFIGURE: Some systems seem to need more than standard program linkage
    to get a data (as opposed to function) item out of a library.
 
@@ -276,3 +296,5 @@ typedef long int pm_filepos;
   #define HAVE_MKSTEMP 1
 #endif
 
+typedef int qsort_comparison_fn(const void *, const void *);
+    /* A compare function to pass to <stdlib.h>'s qsort() */