check and conditionally include sys/types.h, sys/time.h, and unistd.h.

watcom/unistd.h and win32/unistd.h are no longer necessary, especially
after previous commit.
master
Ozkan Sezer 4 years ago committed by Ozkan Sezer
parent 908977d4df
commit 6b018d6999
  1. 2
      Makefile.dos
  2. 2
      Makefile.os2
  3. 2
      Makefile.w32
  4. 2
      configure.ac
  5. 3
      src/Makefile.am
  6. 8
      src/delay.c
  7. 4
      src/main.c
  8. 6
      src/watcom/unistd.h
  9. 6
      src/win32/unistd.h
  10. 2
      vc/xmp.vcproj

@ -19,7 +19,7 @@ CFLAGS += -wcd=303
# -5s : Pentium stack calling conventions.
# -5r : Pentium register calling conventions.
CFLAGS += -5s
INCLUDES = -I"src/watcom" -I"$(%WATCOM)/h"
INCLUDES = -I"$(%WATCOM)/h"
# for sound_sb:
CPPFLAGS+= -DSOUND_SB

@ -23,7 +23,7 @@ CFLAGS += -wcd=303
# -5s : Pentium stack calling conventions.
# -5r : Pentium register calling conventions.
CFLAGS += -5s
INCLUDES = -I"src/watcom" -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
INCLUDES = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
# for sound_dart:
CPPFLAGS = -DSOUND_OS2DART

@ -23,7 +23,7 @@ CFLAGS += -wcd=303
# -5s : Pentium stack calling conventions.
# -5r : Pentium register calling conventions.
CFLAGS += -5s
INCLUDES = -I"src/win32" -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h"
INCLUDES = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h"
# for sound_win32:
CPPFLAGS = -DSOUND_WIN32

@ -99,7 +99,7 @@ AC_DEFUN([AC_CHECK_DEFINED],[
AS_VAR_POPDEF([ac_var])dnl
])
AC_CHECK_HEADERS([getopt.h signal.h sys/select.h sys/time.h sys/audioio.h])
AC_CHECK_HEADERS([sys/types.h unistd.h getopt.h signal.h sys/select.h sys/time.h sys/audioio.h])
case $host_os in
dnl don't check half-baked termios for amiga or dos targets.
amigaos*|aros*|morphos*|*djgpp) ;;

@ -100,5 +100,4 @@ pkgsysconfdir = ${sysconfdir}/${PACKAGE_NAME}
pkgsysconf_DATA = modules.conf xmp.conf
EXTRA_DIST = ${man_MANS} ${pkgsysconf_DATA} \
dos/dosdma.h dos/dosirq.h dos/dossb.h dos/dosutil.h \
win32/unistd.h watcom/unistd.h
dos/dosdma.h dos/dosirq.h dos/dossb.h dos/dosutil.h

@ -13,7 +13,7 @@ void delay_ms(int msec) {
Sleep(msec);
}
#elif defined(__OS2__)
#elif defined(__OS2__)||defined(__EMX__)
#define INCL_DOSPROCESS
#include <os2.h>
@ -40,9 +40,15 @@ void delay_ms(int msec) {
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# endif
# ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
# endif
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
#endif
#include <stddef.h>

@ -18,8 +18,12 @@
#if defined(__WATCOMC__)
#include <time.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdarg.h>
#if defined(HAVE_GETOPT_H) && defined(HAVE_GETOPT_LONG)
#include <getopt.h>

@ -1,6 +0,0 @@
#ifndef XMP_WATCOM_UNISTD_H
#define XMP_WATCOM_UNISTD_H
#include <io.h> /* do not want Watcom unistd.h */
#endif

@ -1,6 +0,0 @@
#ifndef _XMP_WIN32_UNISTD_H
#define _XMP_WIN32_UNISTD_H
#include <io.h>
#endif

@ -38,7 +38,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\src;..\src\win32"
AdditionalIncludeDirectories="..\src"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;SOUND_WIN32"
ExceptionHandling="0"
RuntimeLibrary="2"

Loading…
Cancel
Save