]> code.delx.au - gnu-emacs/blobdiff - lib-src/ntlib.c
(top-level): Does not need cl when compiling.
[gnu-emacs] / lib-src / ntlib.c
index d5f6177f4a269855c355100a8426c2666435de3f..67533894ace154a3e2f377d37610192b164481d8 100644 (file)
@@ -1,11 +1,12 @@
 /* Utility and Unix shadow routines for GNU Emacs support programs on NT.
 /* Utility and Unix shadow routines for GNU Emacs support programs on NT.
-   Copyright (C) 1994 Free Software Foundation, Inc.
+   Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005,
+                 2006, 2007, 2008  Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -15,8 +16,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
 
 You should have received a copy of the GNU General Public License
 along with GNU Emacs; see the file COPYING.  If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.
+the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.
 
    Geoff Voelker (voelker@cs.washington.edu)                         10-8-94
 */
 
    Geoff Voelker (voelker@cs.washington.edu)                         10-8-94
 */
@@ -35,7 +36,7 @@ Boston, MA 02111-1307, USA.
    would necessitate including windows.h in the files that used it.
    This is much easier.  */
 void
    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);
 }
 {
   Sleep (seconds * 1000);
 }
@@ -49,12 +50,6 @@ getwd (char *dir)
   return NULL;
 }
 
   return NULL;
 }
 
-int
-getpid ()
-{
-  return _getpid ();
-}
-
 static HANDLE getppid_parent;
 static int    getppid_ppid;
 
 static HANDLE getppid_parent;
 static int    getppid_ppid;
 
@@ -64,21 +59,21 @@ getppid(void)
   char *ppid;
   DWORD result;
 
   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;
     {
       printf("no pid.\n");
       return 0;
-    } 
-  else 
+    }
+  else
     {
       getppid_ppid = atoi (ppid);
     }
 
     {
       getppid_ppid = atoi (ppid);
     }
 
-  if (!getppid_parent) 
+  if (!getppid_parent)
     {
       getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid));
     {
       getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi(ppid));
-      if (!getppid_parent) 
+      if (!getppid_parent)
        {
          printf ("Failed to open handle to parent process: %d\n",
                 GetLastError());
        {
          printf ("Failed to open handle to parent process: %d\n",
                 GetLastError());
@@ -87,7 +82,7 @@ getppid(void)
     }
 
   result = WaitForSingleObject (getppid_parent, 0);
     }
 
   result = WaitForSingleObject (getppid_parent, 0);
-  switch (result) 
+  switch (result)
     {
     case WAIT_TIMEOUT:
       /* The parent is still alive.  */
     {
     case WAIT_TIMEOUT:
       /* The parent is still alive.  */
@@ -194,7 +189,7 @@ fchown (int fd, int uid, int gid)
 }
 
 /* Place a wrapper around the MSVC version of ctime.  It returns NULL
 }
 
 /* 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)
    (Ulrich Leodolter, 1/11/95).  */
 char *
 sys_ctime (const time_t *t)
@@ -214,3 +209,6 @@ sys_chdir (const char * path)
 {
   return _chdir (path);
 }
 {
   return _chdir (path);
 }
+
+/* arch-tag: 7b63fb83-70ee-4124-8822-54e53e5d0773
+   (do not change this comment) */