Fix gc.h stomping over _beginthread() declaration and other MinGW issues

This commit is contained in:
Samium Gromoff 2010-09-29 22:16:16 +04:00 committed by Juan Jose Garcia Ripoll
parent c2d8e70d1b
commit b999a2c8fb
6 changed files with 33 additions and 28 deletions

View file

@ -22,19 +22,19 @@
by accessing the FILE structure of C.
*/
#include <ecl/ecl.h>
#include <errno.h>
#include <sys/types.h>
#ifndef _MSC_VER
# include <unistd.h>
#endif
#include <fcntl.h>
#if !defined(ECL_MS_WINDOWS_HOST)
#include <sys/stat.h>
#if !defined(_MSC_VER) && !defined(__MINGW32__)
# include <sys/stat.h>
/* it isn't pulled in by fcntl.h */
#endif
#include <string.h>
#include <stdio.h>
#include <ecl/ecl.h>
#include <ecl/ecl-inl.h>
#include <ecl/internal.h>

View file

@ -15,15 +15,15 @@
See file '../Copyright' for full details.
*/
#define ECL_INCLUDE_MATH_H
#include <ecl/ecl.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <float.h>
#ifndef _MSC_VER
#include <unistd.h>
# include <unistd.h>
#endif
#define ECL_INCLUDE_MATH_H
#include <ecl/ecl.h>
#if defined(HAVE_FENV_H)
# include <fenv.h>
#endif

View file

@ -15,9 +15,18 @@
See file '../Copyright' for full details.
*/
#include <time.h>
#ifndef _MSC_VER
# include <unistd.h>
#endif
#if defined(_MSC_VER) || defined(__MINGW32__)
# include <windows.h>
# include <winsock.h>
#endif
#define ECL_INCLUDE_MATH_H
#include <ecl/ecl.h>
#include <time.h>
#include <ecl/internal.h>
#ifdef HAVE_TIMES
# include <sys/times.h>
#endif
@ -28,14 +37,6 @@
#ifdef HAVE_GETTIMEOFDAY
# include <sys/time.h>
#endif
#ifndef _MSC_VER
# include <unistd.h>
#endif
#include <ecl/internal.h>
#if defined(ECL_MS_WINDOWS_HOST)
# include <windows.h>
# include <winsock.h>
#endif
#if !defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_GETRUSAGE) && !defined(ECL_MS_WINDOWS_HOST)
struct timeval {
@ -49,7 +50,7 @@ static struct timeval beginning;
static void
get_real_time(struct timeval *tv)
{
#ifdef HAVE_GETTIMEOFDAY
#if defined(HAVE_GETTIMEOFDAY) && !defined(ECL_MS_WINDOWS_HOST)
struct timezone tz;
gettimeofday(tv, &tz);
#else

View file

@ -15,7 +15,6 @@
See file '../Copyright' for full details.
*/
#include <ecl/ecl.h>
#include <string.h>
#include <stdio.h>
#include <limits.h>
@ -27,6 +26,7 @@
# define F_OK 0
#endif
#include <sys/types.h>
#include <ecl/ecl.h>
#ifdef HAVE_PWD_H
# include <pwd.h>
#endif

View file

@ -74,26 +74,30 @@
#include <stdio.h>
/* To get APCProc calls */
#define _WIN32_WINNT 0x400
#include <signal.h>
#if defined(_MSC_VER) || defined(__MINGW32__)
# include <windows.h>
#endif
#if !defined(_MSC_VER)
# include <unistd.h>
#endif
#include <ecl/ecl.h>
#if defined(HAVE_FENV_H) && !defined(ECL_AVOID_FENV_H)
# ifndef _GNU_SOURCE
# define _GNU_SOURCE
# endif
# include <fenv.h>
#endif
#include <signal.h>
#ifdef ECL_USE_MPROTECT
# ifndef SA_SIGINFO
# error "We cannot use the mmap code without siginfo"
# endif
# include <sys/mman.h>
#endif
#if defined(ECL_MS_WINDOWS_HOST)
# include <windows.h>
#endif
#if !defined(_MSC_VER)
# include <unistd.h>
#endif
#define ECL_DEFINE_FENV_CONSTANTS
#include <ecl/internal.h>
#include <ecl/ecl-inl.h>

View file

@ -15,18 +15,18 @@
See file '../Copyright' for full details.
*/
#include <ecl/ecl.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#if !defined(_MSC_VER)
# include <unistd.h>
#endif
#include <ecl/ecl.h>
#include <ecl/internal.h>
#if defined(ECL_MS_WINDOWS_HOST)
# include <windows.h>
#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif