Author: iratqq
Date: Mon Feb  2 04:11:45 2009
New Revision: 5798

Modified:
   trunk/configure.ac
   trunk/replace/Makefile.am
   trunk/replace/bsd-waitpid.c
   trunk/replace/os_dep.h

Log:
* replace/bsd-waitpid.c:
  - Replace include.h to config.h
* replace/Makefile.am (libreplace_la_SOURCES):
  - Add bsd-waitpid.{c,h}
* configure.ac:
  - Check waitpid(2).
* replace/os_dep.h:
  - Add macro and declaration.


Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Mon Feb  2 04:11:45 2009
@@ -521,6 +521,7 @@
 AC_CHECK_FUNCS([getaddrinfo freeaddrinfo getnameinfo])
 AC_CHECK_FUNCS([issetugid])
 AC_CHECK_FUNCS([poll])
+AC_CHECK_FUNCS([waitpid])

 # IRIX has a const char return value for gai_strerror()
 AC_CHECK_FUNCS(gai_strerror,[

Modified: trunk/replace/Makefile.am
==============================================================================
--- trunk/replace/Makefile.am   (original)
+++ trunk/replace/Makefile.am   Mon Feb  2 04:11:45 2009
@@ -1,2 +1,2 @@
 noinst_LTLIBRARIES = libreplace.la
-libreplace_la_SOURCES = strsep.c getpeereid.c setenv.c os_dep.h strlcpy.c strlcat.c fake-rfc2553.c fake-rfc2553.h bsd-asprintf.c bsd-snprintf.c strtoll.c strtonum.c bsd-poll.c bsd-poll.h +libreplace_la_SOURCES = strsep.c getpeereid.c setenv.c os_dep.h strlcpy.c strlcat.c fake-rfc2553.c fake-rfc2553.h bsd-asprintf.c bsd-snprintf.c strtoll.c strtonum.c bsd-poll.c bsd-poll.h bsd-misc.c bsd-waitpid.c bsd-waitpid.h

Modified: trunk/replace/bsd-waitpid.c
==============================================================================
--- trunk/replace/bsd-waitpid.c (original)
+++ trunk/replace/bsd-waitpid.c Mon Feb  2 04:11:45 2009
@@ -22,7 +22,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */

-#include "includes.h"
+#include <config.h>

 #ifndef HAVE_WAITPID
 #include <errno.h>

Modified: trunk/replace/os_dep.h
==============================================================================
--- trunk/replace/os_dep.h      (original)
+++ trunk/replace/os_dep.h      Mon Feb  2 04:11:45 2009
@@ -138,6 +138,18 @@
 poll(struct pollfd *, nfds_t, int);
 #endif

+#ifdef HAVE_WAITPID
+#include <sys/wait.h>
+#else
+#include "bsd-waitpid.h"
+#endif
+
+#ifndef HAVE_WAITPID
+#define waitpid        uim_internal_waitpid
+pid_t
+waitpid(pid_t, int *, int);
+#endif
+
 #ifdef __cplusplus
 }
 #endif

Reply via email to