]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix compilation warning in the MinGW build
authorEli Zaretskii <eliz@gnu.org>
Fri, 22 Jul 2016 17:38:22 +0000 (20:38 +0300)
committerEli Zaretskii <eliz@gnu.org>
Fri, 22 Jul 2016 17:38:22 +0000 (20:38 +0300)
* nt/inc/ms-w32.h: Include stdint.h.
(_execvp, execve): Provide prototypes.

* lib-src/emacsclient.c [WINDOWSNT]: Remove prototype for execvp,
it is now in nt/inc/ms-w32.h.
* lib-src/ntlib.c (getppid): Avoid compiler warnings due to format
mismatch.
(sys_ctime): Remove, not used.

lib-src/emacsclient.c
lib-src/ntlib.c
nt/inc/ms-w32.h

index 7792d0a2c748741df35cb559296001faa631547c..1991aaa9c02147344785104b19148bd5aaf16f82 100644 (file)
@@ -388,7 +388,6 @@ w32_window_app (void)
   directly into the argv array of the child process.  */
 
 int w32_execvp (const char *, char **);
-extern int execvp (const char*, char **);
 
 int
 w32_execvp (const char *path, char **argv)
index 2ace218f8231330b54d351f4de04ac9dcf4a5a88..2ac021936ae3df110c7685dd736e14a1dd36b9e6 100644 (file)
@@ -98,7 +98,7 @@ getppid (void)
       getppid_parent = OpenProcess (SYNCHRONIZE, FALSE, atoi (ppid));
       if (!getppid_parent)
        {
-         printf ("Failed to open handle to parent process: %d\n",
+         printf ("Failed to open handle to parent process: %lu\n",
                 GetLastError ());
          exit (1);
        }
@@ -115,7 +115,7 @@ getppid (void)
       return 1;
     case WAIT_FAILED:
     default:
-      printf ("Checking parent status failed: %d\n", GetLastError ());
+      printf ("Checking parent status failed: %lu\n", GetLastError ());
       exit (1);
     }
 }
@@ -258,16 +258,6 @@ fchown (int fd, unsigned uid, unsigned gid)
   return 0;
 }
 
-/* Place a wrapper around the MSVC version of ctime.  It returns NULL
-   on network directories, so we handle that case here.
-   (Ulrich Leodolter, 1/11/95).  */
-char *
-sys_ctime (const time_t *t)
-{
-  char *str = (char *) ctime (t);
-  return (str ? str : "Sun Jan 01 00:00:00 1970");
-}
-
 FILE *
 sys_fopen (const char * path, const char * mode)
 {
index 5fd54e2f926d8ba7e8cfd277057cb96c540395f3..bb8ae6ad8f912e29c255ff0cf4da839f7ed95067 100644 (file)
@@ -291,6 +291,9 @@ extern int sys_umask (int);
 /* Map to MSVC names.  */
 #define execlp    _execlp
 #define execvp    _execvp
+#include <stdint.h>            /* for intptr_t */
+extern intptr_t _execvp (const char *, char **);
+extern intptr_t execve (const char *, char * const *, char * const *);
 #define fdatasync _commit
 #define fdopen   _fdopen
 #define fsync    _commit