Commit 5740003e authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺
Browse files

Simplify code via AC_USE_SYSTEM_EXTENSIONS

`AC_USE_SYSTEM_EXTENSIONS` takes care of defining feature_test_macros(7)
thereby allowing us to remove a few manual `#define`s
parent 03632e32
......@@ -4,17 +4,6 @@
* Directory Runtime Support
*/
/* needed only for solaris2_HOST_OS */
#ifdef __GLASGOW_HASKELL__
#include "ghcconfig.h"
#endif
// The following is required on Solaris to force the POSIX versions of
// the various _r functions instead of the Solaris versions.
#ifdef solaris2_HOST_OS
#define _POSIX_PTHREAD_SEMANTICS
#endif
#include "HsUnix.h"
/*
......
......@@ -11,10 +11,6 @@
#include "HsUnixConfig.h"
#if HAVE_EXECVPE
# define _GNU_SOURCE
#endif
#include <errno.h>
#include <sys/types.h>
#if HAVE_SYS_WAIT_H
......
AC_INIT([Haskell unix package], [2.0], [libraries@haskell.org], [unix])
AC_PREREQ([2.60])
# Safety check: Ensure that we are in the correct source directory.
AC_CONFIG_SRCDIR([include/HsUnix.h])
AC_USE_SYSTEM_EXTENSIONS
AC_ARG_WITH([cc],
[C compiler],
[CC=$withval])
......
......@@ -19,10 +19,6 @@
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
#ifdef solaris2_HOST_OS
#define _POSIX_PTHREAD_SEMANTICS
#endif
#include <stdlib.h>
#include <stdio.h>
......
......@@ -14,7 +14,6 @@ __hsunix_execvpe(const char *name, char *const argv[], char *const envp[]);
#ifndef HSUNIX_EXECVPE_H_NO_COMPAT
#include "HsUnixConfig.h"
#if HAVE_EXECVPE
# define _GNU_SOURCE
# include <unistd.h>
extern int
execvpe(const char *name, char *const argv[], char *const envp[]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment