]> code.delx.au - gnu-emacs/blobdiff - lib-src/ntlib.c
*** empty log message ***
[gnu-emacs] / lib-src / ntlib.c
index 5acc8363437900bd94fbff8cf0dd109c84967706..31bf758197de0aa97ee325351737073268cfe0d5 100644 (file)
@@ -35,13 +35,13 @@ Boston, MA 02111-1307, USA.
    would necessitate including windows.h in the files that used it.
    This is much easier.  */
 void
-sleep(int seconds)
+sleep(unsigned long seconds)
 {
   Sleep (seconds * 1000);
 }
 
 /* Get the current working directory.  */
-int
+char *
 getwd (char *dir)
 {
   if (GetCurrentDirectory (MAXPATHLEN, dir) > 0)
@@ -49,12 +49,6 @@ getwd (char *dir)
   return NULL;
 }
 
-int
-getpid ()
-{
-  return _getpid ();
-}
-
 static HANDLE getppid_parent;
 static int    getppid_ppid;
 
@@ -64,21 +58,21 @@ getppid(void)
   char *ppid;
   DWORD result;
 
-  ppid = getenv ("__PARENT_PROCESS_ID");
-  if (!ppid) 
+  ppid = getenv ("EM_PARENT_PROCESS_ID");
+  if (!ppid)
     {
       printf("no pid.\n");
       return 0;
-    } 
-  else 
+    }
+  else
     {
       getppid_ppid = atoi (ppid);
     }
 
-  if (!getppid_parent) 
+  if (!getppid_parent)
     {
       getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid));
-      if (!getppid_parent) 
+      if (!getppid_parent)
        {
          printf ("Failed to open handle to parent process: %d\n",
                 GetLastError());
@@ -87,7 +81,7 @@ getppid(void)
     }
 
   result = WaitForSingleObject (getppid_parent, 0);
-  switch (result) 
+  switch (result)
     {
     case WAIT_TIMEOUT:
       /* The parent is still alive.  */
@@ -194,7 +188,7 @@ fchown (int fd, int uid, int gid)
 }
 
 /* Place a wrapper around the MSVC version of ctime.  It returns NULL
-   on network directories, so we handle that case here.  
+   on network directories, so we handle that case here.
    (Ulrich Leodolter, 1/11/95).  */
 char *
 sys_ctime (const time_t *t)