]> andersk Git - splint.git/blobdiff - src/osd.c
Updating to use the LEnsures and LRequires instead of the ensures requires so
[splint.git] / src / osd.c
index 81749adb34295f9489ba6384a748c4919b2ebc86..4c06580d30d0bc431bcd095936fea38c689bae2a 100644 (file)
--- a/src/osd.c
+++ b/src/osd.c
@@ -34,6 +34,9 @@
  * - added include of new header portab.h.
  * - changed '/' to macro.
  * - added DOS / OS/2 specific stuff in osd_getPath.
+ * Herbert 06/12/2000:
+ * - added OS/2 specific includes before osd_getPid()
+ * - handle files like in WIN32 for OS/2 in osd_fileExists()
  */
 
 /*@-allmacros*/
@@ -155,11 +158,7 @@ osd_getPath (char *path, char *file, char **returnPath)
     *fullPath == '\0' || 
     (*file == CONNECTCHAR || (file[0] != '\0' && file[1] == ':')))
 # else
-# ifdef WIN32
-       (*file == CONNECTCHAR || (file[0] != '\0' && file[1] == ':')))
-# else
-    (*file == CONNECTCHAR))
-# endif
+     (*file == CONNECTCHAR))
 # endif
     {
      /* No path specified. Look for it in the current directory.           */
@@ -272,7 +271,7 @@ osd_fileExists (char *filespec)
   struct stat buf;
   return (stat (filespec, &buf) == 0);
 # else
-# ifdef WIN32
+# if defined (WIN32) || defined (OS2)
   FILE *test = fopen (filespec, "r");
   if (test != NULL) 
   {
@@ -451,21 +450,23 @@ int osd_unlink (const char *fname)
   return res;
 }
 
-# ifdef WIN32
+# if defined (WIN32) || (defined(OS2) && defined(__IBMC__))
 # include <process.h>
+# elif defined OS2
+# include <unistd.h>
 # endif
 
-# ifdef WIN32
+# if defined (WIN32) || defined (OS2) && defined (__IBMC__)
 int
 # else
 int /* pid_t */
 # endif
 osd_getPid ()
 {
-# ifdef WIN32
+# if defined (WIN32) || defined (OS2) && defined (__IBMC__)
   int pid = _getpid ();
 # else
-  pid_t pid = getpid ();
+   pid_t pid = getpid ();
 # endif
 
   return (int) pid;
This page took 0.061906 seconds and 4 git commands to generate.