From 7e8b50d9e556b1c8b393199995ef3ea85b9f4525 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 1 Nov 2012 16:21:45 +0200 Subject: [PATCH] Fix MS-Windows build broken by fixing bug #12776 on Posix platforms. src/w32proc.c (getpgrp, setpgid): New functions. nt/inc/unistd.h (setpgid, getpgrp): Provide prototypes. nt/config.nt (GETPGRP_VOID): Define to 1. --- nt/ChangeLog | 6 ++++++ nt/config.nt | 2 +- nt/inc/unistd.h | 2 ++ src/ChangeLog | 4 ++++ src/w32proc.c | 12 ++++++++++++ 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/nt/ChangeLog b/nt/ChangeLog index c915ee40bb..d34d23df4d 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,9 @@ +2012-11-01 Eli Zaretskii + + * inc/unistd.h (setpgid, getpgrp): Provide prototypes. (Bug#12776) + + * config.nt (GETPGRP_VOID): Define to 1. + 2012-10-24 Juanma Barranquero * config.nt: Sync with autogen/config.in. diff --git a/nt/config.nt b/nt/config.nt index 4dc7ede188..ed1cddf1e1 100644 --- a/nt/config.nt +++ b/nt/config.nt @@ -184,7 +184,7 @@ along with GNU Emacs. If not, see . */ #define GC_SETJMP_WORKS 1 /* Define to 1 if the `getpgrp' function requires zero arguments. */ -#undef GETPGRP_VOID +#define GETPGRP_VOID 1 /* Define if gettimeofday clobbers the localtime buffer. */ #undef GETTIMEOFDAY_CLOBBERS_LOCALTIME diff --git a/nt/inc/unistd.h b/nt/inc/unistd.h index 7db6cf08be..383bc3dece 100644 --- a/nt/inc/unistd.h +++ b/nt/inc/unistd.h @@ -10,5 +10,7 @@ extern ssize_t readlink (const char *, char *, size_t); extern int symlink (char const *, char const *); +extern int setpgid (pid_t, pid_t); +extern pid_t getpgrp (void); #endif /* _UNISTD_H */ diff --git a/src/ChangeLog b/src/ChangeLog index 4dc18b6909..e762eb13b8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-11-01 Eli Zaretskii + + * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776) + 2012-10-31 Paul Eggert Fix crash when using Emacs as commit editor for git (Bug#12697). diff --git a/src/w32proc.c b/src/w32proc.c index a0ff96e593..adef7651b8 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -236,6 +236,18 @@ setpgrp (int pid, int gid) return 0; } +pid_t +getpgrp (void) +{ + return getpid (); +} + +int +setpgid (pid_t pid, pid_t pgid) +{ + return 0; +} + /* Emulations of interval timers. Limitations: only ITIMER_REAL and ITIMER_PROF are supported. -- 2.20.1