To get splint 3.1.2 to compile on Mac OS X I needed the following change:

--- osd.c~      2010-01-21 21:02:18.000000000 +1100
+++ osd.c       2010-01-21 21:02:25.000000000 +1100
@@ -516,7 +516,7 @@
  # if defined (WIN32) || defined (OS2) && defined (__IBMC__)
    int pid = _getpid ();
  # else
-  __pid_t pid = getpid ();
+  pid_t pid = getpid ();
  # endif

    return (int) pid;

I don't know what appropriate preprocessor macro could reliably check for that. 
My 
compiler has _PID_T defined, so maybe that? Alternatively, __APPLE__ is 
defined, 
but I'm not sure what it really means--whether it is a platform thing, or a 
gcc-version thing. __MACH__ might serve that purpose better. Not sure. _PID_T 
sounds like a reasonable bet to me.

Ben.



_______________________________________________
splint-discuss mailing list
splint-discuss@mail.cs.virginia.edu
http://www.cs.virginia.edu/mailman/listinfo/splint-discuss

Reply via email to