mirror of https://github.com/OpenTTD/OpenTTD
(svn r7461) -Fix: [FS#262] Add support for building with GCC on OS/2 (psmedley)
parent
74106ce6e9
commit
14363bfb51
4
Makefile
4
Makefile
|
@ -255,9 +255,13 @@ endif
|
||||||
# Executable file extension
|
# Executable file extension
|
||||||
ifdef WIN32
|
ifdef WIN32
|
||||||
EXE=.exe
|
EXE=.exe
|
||||||
|
else
|
||||||
|
ifdef OS2
|
||||||
|
EXE=.exe
|
||||||
else
|
else
|
||||||
EXE=
|
EXE=
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Set output executable names
|
# Set output executable names
|
||||||
TTD=openttd$(EXE)
|
TTD=openttd$(EXE)
|
||||||
|
|
|
@ -20,7 +20,7 @@ function showhelp() {
|
||||||
echo " --host-cxx Sets the C++ host-compiler []"
|
echo " --host-cxx Sets the C++ host-compiler []"
|
||||||
echo " --os Sets the OS. Listens to: [detected]"
|
echo " --os Sets the OS. Listens to: [detected]"
|
||||||
echo " UNIX, OSX, FREEBSD, MORPHOS"
|
echo " UNIX, OSX, FREEBSD, MORPHOS"
|
||||||
echo " BEOS, SUNOS, CYGWIN, MINGW"
|
echo " BEOS, SUNOS, CYGWIN, MINGW, OS2"
|
||||||
echo " --windres Sets the windres (Windows) [windres]"
|
echo " --windres Sets the windres (Windows) [windres]"
|
||||||
echo " --force-le Force LE platform [no]"
|
echo " --force-le Force LE platform [no]"
|
||||||
echo " --force-be Force BE platform [no]"
|
echo " --force-be Force BE platform [no]"
|
||||||
|
@ -277,6 +277,9 @@ then
|
||||||
BEOS)
|
BEOS)
|
||||||
PARAM="$PARAM BEOS=1 UNIX=1"
|
PARAM="$PARAM BEOS=1 UNIX=1"
|
||||||
;;
|
;;
|
||||||
|
OS2)
|
||||||
|
PARAM="$PARAM OS2=1 UNIX=1"
|
||||||
|
;;
|
||||||
SUNOS)
|
SUNOS)
|
||||||
PARAM="$PARAM SUNOS=1 UNIX=1"
|
PARAM="$PARAM SUNOS=1 UNIX=1"
|
||||||
;;
|
;;
|
||||||
|
|
2
driver.c
2
driver.c
|
@ -45,7 +45,7 @@ static const DriverDesc _music_driver_descs[] = {
|
||||||
#ifdef __BEOS__
|
#ifdef __BEOS__
|
||||||
M("bemidi", "BeOS MIDI Driver", &_bemidi_music_driver),
|
M("bemidi", "BeOS MIDI Driver", &_bemidi_music_driver),
|
||||||
#endif
|
#endif
|
||||||
#ifdef __OS2__
|
#if defined(__OS2__) && !defined(__INNOTEK_LIBC__)
|
||||||
M("os2", "OS/2 Music Driver", &_os2_music_driver),
|
M("os2", "OS/2 Music Driver", &_os2_music_driver),
|
||||||
#endif
|
#endif
|
||||||
#ifdef WIN32_ENABLE_DIRECTMUSIC_SUPPORT
|
#ifdef WIN32_ENABLE_DIRECTMUSIC_SUPPORT
|
||||||
|
|
|
@ -84,6 +84,7 @@ $(MAKE_CONFIG):
|
||||||
$(call CONFIG_LINE,FREEBSD:=$(FREEBSD))
|
$(call CONFIG_LINE,FREEBSD:=$(FREEBSD))
|
||||||
$(call CONFIG_LINE,MORPHOS:=$(MORPHOS))
|
$(call CONFIG_LINE,MORPHOS:=$(MORPHOS))
|
||||||
$(call CONFIG_LINE,BEOS:=$(BEOS))
|
$(call CONFIG_LINE,BEOS:=$(BEOS))
|
||||||
|
$(call CONFIG_LINE,OS2:=$(OS2))
|
||||||
$(call CONFIG_LINE,SUNOS:=$(SUNOS))
|
$(call CONFIG_LINE,SUNOS:=$(SUNOS))
|
||||||
$(call CONFIG_LINE,CYGWIN:=$(CYGWIN))
|
$(call CONFIG_LINE,CYGWIN:=$(CYGWIN))
|
||||||
$(call CONFIG_LINE,MINGW:=$(MINGW))
|
$(call CONFIG_LINE,MINGW:=$(MINGW))
|
||||||
|
|
|
@ -64,7 +64,7 @@ typedef unsigned long in_addr_t;
|
||||||
# include <arpa/inet.h>
|
# include <arpa/inet.h>
|
||||||
# include <net/if.h>
|
# include <net/if.h>
|
||||||
// According to glibc/NEWS, <ifaddrs.h> appeared in glibc-2.3.
|
// According to glibc/NEWS, <ifaddrs.h> appeared in glibc-2.3.
|
||||||
# if !defined(__sgi__) && !defined(SUNOS) && !defined(__MORPHOS__) && !defined(__BEOS__) \
|
# if !defined(__sgi__) && !defined(SUNOS) && !defined(__MORPHOS__) && !defined(__BEOS__) && !defined(__INNOTEK_LIBC__) \
|
||||||
&& !(defined(__GLIBC__) && (__GLIBC__ <= 2) && (__GLIBC_MINOR__ <= 2)) && !defined(__dietlibc__)
|
&& !(defined(__GLIBC__) && (__GLIBC__ <= 2) && (__GLIBC_MINOR__ <= 2)) && !defined(__dietlibc__)
|
||||||
// If for any reason ifaddrs.h does not exist on your system, comment out
|
// If for any reason ifaddrs.h does not exist on your system, comment out
|
||||||
// the following two lines and an alternative way will be used to fetch
|
// the following two lines and an alternative way will be used to fetch
|
||||||
|
@ -118,7 +118,9 @@ typedef unsigned long in_addr_t;
|
||||||
# define INADDR_NONE 0xffffffff
|
# define INADDR_NONE 0xffffffff
|
||||||
|
|
||||||
typedef int socklen_t;
|
typedef int socklen_t;
|
||||||
|
#if !defined(__INNOTEK_LIBC__)
|
||||||
typedef unsigned long in_addr_t;
|
typedef unsigned long in_addr_t;
|
||||||
|
#endif /* __INNOTEK_LIBC__ */
|
||||||
#endif // OS/2
|
#endif // OS/2
|
||||||
|
|
||||||
// MorphOS and Amiga stuff
|
// MorphOS and Amiga stuff
|
||||||
|
|
Loading…
Reference in New Issue