1
0
Fork 0

MINGW patch from Benot Laniel

This commit is contained in:
fredb 2010-01-23 22:26:30 +00:00 committed by Tim Moore
parent 2a29c8c604
commit 00e9ad3055
27 changed files with 124 additions and 58 deletions

View file

@ -17,6 +17,7 @@ AC_PROG_MAKE_SET
AC_PROG_CC AC_PROG_CC
AC_PROG_CPP AC_PROG_CPP
AC_PROG_CXX AC_PROG_CXX
AC_PROG_CXXCPP
AC_PROG_RANLIB AC_PROG_RANLIB
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_LN_S AC_PROG_LN_S
@ -216,7 +217,6 @@ if test "x$with_threads" = "xyes"; then
CFLAGS="$CFLAGS -D_REENTRANT" CFLAGS="$CFLAGS -D_REENTRANT"
fi fi
AC_CHECK_HEADER(pthread.h) AC_CHECK_HEADER(pthread.h)
AM_CONDITIONAL(WITH_THREADS, test "x$with_threads" = "xyes")
dnl Used by JSBSim to conditionally compile in fgfs interface code dnl Used by JSBSim to conditionally compile in fgfs interface code
AC_DEFINE([FGFS], 1, [Define so that JSBSim compiles in 'library' mode]) AC_DEFINE([FGFS], 1, [Define so that JSBSim compiles in 'library' mode])
@ -276,6 +276,7 @@ if test "x$ac_cv_header_pthread_h" = "xyes"; then
if test "x$ac_cv_search_pthread_exit" = "x-lc_r"; then if test "x$ac_cv_search_pthread_exit" = "x-lc_r"; then
CXXFLAGS="-pthread $CXXFLAGS" CXXFLAGS="-pthread $CXXFLAGS"
CFLAGS="-pthread $CFLAGS" CFLAGS="-pthread $CFLAGS"
LIBS="-lsgthreads $LIBS"
fi fi
fi fi
@ -404,7 +405,7 @@ case "${host}" in
dnl CygWin under Windoze. dnl CygWin under Windoze.
INCLUDES="$INCLUDES -I/usr/local/include/" INCLUDES="$INCLUDES -I/usr/local/include/"
LIBS="$LIBS -L/usr/local/lib" LIBS="$LIBS -L/usr/local/lib"
AC_SEARCH_LIBS(alGenBuffers, [ openal32 openal ] ) AC_SEARCH_LIBS(alGenBuffers, [ openal32 openal 'openal -ldsound -lwinmm' ] )
AC_SEARCH_LIBS(alutInit, [ openal32 ALut alut ] ) AC_SEARCH_LIBS(alutInit, [ openal32 ALut alut ] )
LIBS="$LIBS -lwinmm -ldsound -ldxguid -lole32" LIBS="$LIBS -lwinmm -ldsound -ldxguid -lole32"
openal_LIBS="$LIBS" openal_LIBS="$LIBS"
@ -681,7 +682,7 @@ case "${host}" in
AC_CHECK_LIB(osgViewerd,osgViewerGetVersion) AC_CHECK_LIB(osgViewerd,osgViewerGetVersion)
AC_CHECK_LIB(osgSimd,osgSimGetVersion) AC_CHECK_LIB(osgSimd,osgSimGetVersion)
AC_CHECK_LIB(osgParticled,osgParticleGetVersion) AC_CHECK_LIB(osgParticled,osgParticleGetVersion)
LIBS="$LIBS -losgFXd" LIBS="$LIBS -losgFXd $opengl_LIBS"
else else
AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion) AC_CHECK_LIB(OpenThreads,OpenThreadsGetVersion)
AC_CHECK_LIB(osg,osgGetVersion) AC_CHECK_LIB(osg,osgGetVersion)
@ -692,7 +693,7 @@ case "${host}" in
AC_CHECK_LIB(osgViewer,osgViewerGetVersion) AC_CHECK_LIB(osgViewer,osgViewerGetVersion)
AC_CHECK_LIB(osgSim,osgSimGetVersion) AC_CHECK_LIB(osgSim,osgSimGetVersion)
AC_CHECK_LIB(osgParticle,osgParticleGetVersion) AC_CHECK_LIB(osgParticle,osgParticleGetVersion)
LIBS="$LIBS -losgFX" LIBS="$LIBS -losgFX $opengl_LIBS"
fi fi
;; ;;
esac esac
@ -718,6 +719,41 @@ AC_COMPILE_IFELSE(
[AC_DEFINE([HAVE_CULLSETTINGS_CLEAR_MASK],1,[define if OSG has CullSettings::CLEAR_MASK]) [AC_DEFINE([HAVE_CULLSETTINGS_CLEAR_MASK],1,[define if OSG has CullSettings::CLEAR_MASK])
AC_MSG_RESULT([yes])], AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])]) [AC_MSG_RESULT([no])])
# Special handling for static version of OSG
if test -n "`echo "$CPPFLAGS" "$CXXFLAGS" "$CFLAGS" | grep "\-DOSG_LIBRARY_STATIC" 2>/dev/null`" ; then
saved_LIBS="$LIBS"
LIBS=""
#***** Check image support (needed for static build) *****
AC_SEARCH_LIBS([jpeg_read_header], [jpeg], [CPPFLAGS="$CPPFLAGS -DOSG_JPEG_ENABLED"])
AC_SEARCH_LIBS([png_read_image], [png 'png -lz'], [CPPFLAGS="$CPPFLAGS -DOSG_PNG_ENABLED"])
AC_SEARCH_LIBS([TIFFOpen], [tiff], [CPPFLAGS="$CPPFLAGS -DOSG_TIFF_ENABLED"])
img_LIBS="$LIBS"
LIBS="$saved_LIBS"
if test "x$with_osg" != "x" ; then
osg_prefix="$with_osg"
else
osg_prefix="/usr"
fi
PKG_CHECK_EXISTS([openscenegraph], [osg_version="`$PKG_CONFIG --modversion openscenegraph 2>/dev/null`"])
LIBS="-L$osg_prefix/lib/osgPlugins-$osg_version -losgdb_bmp -losgdb_dds -losgdb_hdr -losgdb_pic -losgdb_pnm -losgdb_rgb -losgdb_tga \
-losgdb_3ds -losgdb_ac -losgdb_ive -losgdb_osg -losgdb_txf \
-losgVolume -losgTerrain $LIBS -losgUtil"
if test -n "`echo "$CPPFLAGS" "$CXXFLAGS" "$CFLAGS" | grep "\-DOSG_JPEG_ENABLED" 2>/dev/null`" ; then
LIBS="$LIBS -losgdb_jpeg"
fi
if test -n "`echo "$CPPFLAGS" "$CXXFLAGS" "$CFLAGS" | grep "\-DOSG_PNG_ENABLED" 2>/dev/null`" ; then
LIBS="$LIBS -losgdb_png"
fi
if test -n "`echo "$CPPFLAGS" "$CXXFLAGS" "$CFLAGS" | grep "\-DOSG_TIFF_ENABLED" 2>/dev/null`" ; then
LIBS="$LIBS -losgdb_tiff"
fi
LIBS="$LIBS $img_LIBS"
fi
AC_LANG_POP AC_LANG_POP
dnl Check for system installed zlib dnl Check for system installed zlib

View file

@ -61,7 +61,7 @@ extern void fgDumpSnapShotWrapper();
extern void fgHiResDumpWrapper(); extern void fgHiResDumpWrapper();
extern void fgHiResDump(); extern void fgHiResDump();
#endif #endif
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__) #if defined( _WIN32 ) && !defined(__MINGW32__)
extern void printScreen(); extern void printScreen();
#endif #endif
extern void helpCb(); extern void helpCb();

View file

@ -51,12 +51,12 @@
#include <Main/viewmgr.hxx> #include <Main/viewmgr.hxx>
#include <GUI/new_gui.hxx> #include <GUI/new_gui.hxx>
#if defined( WIN32 ) && !defined( __CYGWIN__ ) && !defined(__MINGW32__) #ifdef _WIN32
# include <shellapi.h>
# if !defined(__MINGW32__)
# include <simgear/screen/win32-printer.h> # include <simgear/screen/win32-printer.h>
# include <simgear/screen/GlBitmaps.h> # include <simgear/screen/GlBitmaps.h>
#endif # endif
#ifdef __MINGW32__
#include <shellapi.h>
#endif #endif
#include "gui.h" #include "gui.h"
@ -75,7 +75,7 @@ const __fg_gui_fn_t __fg_gui_fn[] = {
{"dumpHiResSnapShot", fgHiResDumpWrapper}, {"dumpHiResSnapShot", fgHiResDumpWrapper},
#endif #endif
{"dumpSnapShot", fgDumpSnapShotWrapper}, {"dumpSnapShot", fgDumpSnapShotWrapper},
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__) #if defined( _WIN32 ) && !defined(__MINGW32__)
{"printScreen", printScreen}, {"printScreen", printScreen},
#endif #endif
// Help // Help
@ -170,7 +170,7 @@ void helpCb ()
SGPath path( globals->get_fg_root() ); SGPath path( globals->get_fg_root() );
path.append( "Docs/index.html" ); path.append( "Docs/index.html" );
#if !defined(WIN32) #ifndef _WIN32
command = globals->get_browser(); command = globals->get_browser();
string::size_type pos; string::size_type pos;
@ -182,7 +182,7 @@ void helpCb ()
command += " &"; command += " &";
system( command.c_str() ); system( command.c_str() );
#else // WIN32 #else // _WIN32
// Look for favorite browser // Look for favorite browser
char Dummy[1024], ExecName[1024], browserParameter[1024]; char Dummy[1024], ExecName[1024], browserParameter[1024];
@ -404,7 +404,7 @@ void fgHiResDump()
#endif // #if defined( TR_HIRES_SNAP) #endif // #if defined( TR_HIRES_SNAP)
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__) #if defined( _WIN32 ) && !defined(__MINGW32__)
void rotateView( double roll, double pitch, double yaw ) void rotateView( double roll, double pitch, double yaw )
{ {
@ -441,7 +441,7 @@ GLubyte *hiResScreenCapture( int multiplier )
} }
#endif #endif
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__) #if defined( _WIN32 ) && !defined(__MINGW32__)
// win32 print screen function // win32 print screen function
void printScreen () { void printScreen () {
int mouse = fgGetMouseCursor(); int mouse = fgGetMouseCursor();
@ -455,7 +455,7 @@ void printScreen () {
fgSetMouseCursor(mouse); fgSetMouseCursor(mouse);
} }
#endif // #ifdef WIN32 #endif // #ifdef _WIN32
void fgDumpSnapShotWrapper () { void fgDumpSnapShotWrapper () {

View file

@ -36,7 +36,7 @@ do_hires_snapshot_dialog (const SGPropertyNode * arg)
} }
#endif // TR_HIRES_SNAP #endif // TR_HIRES_SNAP
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__) #if defined( _WIN32 ) && !defined(__MINGW32__)
extern void printScreen (); extern void printScreen ();
static bool static bool
do_print_dialog (const SGPropertyNode * arg) do_print_dialog (const SGPropertyNode * arg)
@ -61,7 +61,7 @@ static struct {
#if defined(TR_HIRES_SNAP) #if defined(TR_HIRES_SNAP)
{ "old-hires-snapshot-dialog", do_hires_snapshot_dialog }, { "old-hires-snapshot-dialog", do_hires_snapshot_dialog },
#endif #endif
#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__) #if defined( _WIN32 ) && !defined(__MINGW32__)
{ "old-print-dialog", do_print_dialog }, { "old-print-dialog", do_print_dialog },
#endif #endif
{ "old-help-dialog", do_help_dialog }, { "old-help-dialog", do_help_dialog },

View file

@ -2,8 +2,11 @@
// Alterations: Copyright C. Hotchkiss 1996 // Alterations: Copyright C. Hotchkiss 1996
// //
// $Log$ // $Log$
// Revision 1.1 2002/09/10 01:14:04 curt // Revision 1.2 2010/01/23 22:26:52 fredb
// Initial revision // MINGW patch from Benoît Laniel
//
// Revision 1.1.1.1 2002-09-10 01:14:04 curt
// Initial revision of FlightGear-0.9.0
// //
// Revision 1.2 2001/05/16 21:27:59 curt // Revision 1.2 2001/05/16 21:27:59 curt
// Added David Megginson's patch for reconfigurable keyboard bindings. // Added David Megginson's patch for reconfigurable keyboard bindings.
@ -75,11 +78,11 @@ typedef long LONG ; // 32-bit signed data
typedef unsigned long ULONG ; // 32-bit unsigned data typedef unsigned long ULONG ; // 32-bit unsigned data
typedef unsigned short UWORD; // Unsigned 16 bit quantity (WIN=SHORT) typedef unsigned short UWORD; // Unsigned 16 bit quantity (WIN=SHORT)
#if !defined(WIN32) #ifndef _WIN32
typedef signed short WORD; // Signed 16 bit quantity typedef signed short WORD; // Signed 16 bit quantity
#endif #endif
typedef BYTE UBYTE; // Used in some 3rd party code typedef BYTE UBYTE; // Used in some 3rd party code
#ifndef WIN32 #ifndef _WIN32
typedef int BOOLEAN; // typedef int BOOLEAN; //
#endif #endif

View file

@ -47,7 +47,7 @@ js_demo_LDADD = $(js_demo_PLIB_LIBS) $(base_LIBS) $(joystick_LIBS)
fgjs_SOURCES = fgjs.cxx jsinput.cxx jsinput.h jssuper.cxx jssuper.h fgjs_SOURCES = fgjs.cxx jsinput.cxx jsinput.h jssuper.cxx jssuper.h
fgjs_LDADD = $(js_demo_PLIB_LIBS) $(base_LIBS) $(joystick_LIBS) \ fgjs_LDADD = $(js_demo_PLIB_LIBS) $(base_LIBS) $(joystick_LIBS) \
-lsgprops -lsgmisc -lsgio -lsgdebug -lsgstructure -lsgxml -lz -lsgprops -lsgmisc -lsgio -lsgdebug -lsgstructure -lsgxml -lz $(network_LIBS)
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/Main \ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/Main \
$(libInput_Event_INCLUDES) $(libInput_Event_INCLUDES)

View file

@ -28,8 +28,8 @@
#include <simgear/compiler.h> #include <simgear/compiler.h>
#if defined( _MSC_VER ) || defined( __MINGW32__ ) #ifdef _WIN32
# include <Winsock2.h> # include <winsock2.h>
#endif #endif
#include <math.h> #include <math.h>
@ -338,9 +338,9 @@ string getFGRoot ( int argc, char **argv ) {
// find fg-root any other way. // find fg-root any other way.
if ( root.empty() ) { if ( root.empty() ) {
#if defined( __CYGWIN__ ) #if defined( __CYGWIN__ )
root = "/FlightGear"; root = "../data";
#elif defined( WIN32 ) #elif defined( _WIN32 )
root = "\\FlightGear"; root = "..\\data";
#elif defined(OSX_BUNDLE) #elif defined(OSX_BUNDLE)
/* the following code looks for the base package directly inside /* the following code looks for the base package directly inside
the application bundle. This can be changed fairly easily by the application bundle. This can be changed fairly easily by

View file

@ -98,7 +98,7 @@ int main ( int, char ** )
/* give other processes a chance */ /* give other processes a chance */
#ifdef WIN32 #ifdef _WIN32
Sleep ( 1 ) ; Sleep ( 1 ) ;
#elif defined(sgi) #elif defined(sgi)
sginap ( 1 ) ; sginap ( 1 ) ;

View file

@ -9,12 +9,6 @@ else
SP_FDM_LIBS = SP_FDM_LIBS =
endif endif
if WITH_THREADS
THREAD_LIBS = -lsgthreads $(thread_LIBS)
else
THREAD_LIBS =
endif
if WITH_EVENTINPUT if WITH_EVENTINPUT
EVENT_LIBS = $(eventinput_LIBS) EVENT_LIBS = $(eventinput_LIBS)
else else
@ -119,7 +113,7 @@ fgfs_LDADD = \
-lsgserial -lsgstructure -lsgenvironment \ -lsgserial -lsgstructure -lsgenvironment \
$(fgfs_PLIB_LIBS) \ $(fgfs_PLIB_LIBS) \
$(OSG_LIBS) \ $(OSG_LIBS) \
$(THREAD_LIBS) \ $(thread_LIBS) \
$(network_LIBS) \ $(network_LIBS) \
-lz \ -lz \
$(opengl_LIBS) \ $(opengl_LIBS) \

View file

@ -183,7 +183,7 @@ int main ( int argc, char **argv ) {
} }
initFPE(); initFPE();
#endif #endif
#if !defined( _MSC_VER ) && !defined( __MINGW32__ ) #ifndef _WIN32
signal(SIGPIPE, SIG_IGN); signal(SIGPIPE, SIG_IGN);
#endif #endif

View file

@ -189,7 +189,7 @@ do_exit (const SGPropertyNode * arg)
fgSetBool("/sim/signals/exit", true); fgSetBool("/sim/signals/exit", true);
if (fgGetBool("/sim/startup/save-on-exit")) { if (fgGetBool("/sim/startup/save-on-exit")) {
#ifdef _MSC_VER #ifdef _WIN32
char* envp = ::getenv( "APPDATA" ); char* envp = ::getenv( "APPDATA" );
if ( envp != NULL ) { if ( envp != NULL ) {
SGPath config( envp ); SGPath config( envp );

View file

@ -32,12 +32,12 @@
#if defined( unix ) || defined( __CYGWIN__ ) #if defined( unix ) || defined( __CYGWIN__ )
# include <unistd.h> // for gethostname() # include <unistd.h> // for gethostname()
#endif #endif
#if defined( _MSC_VER) || defined(__MINGW32__) #ifdef _WIN32
# include <direct.h> // for getcwd() # include <direct.h> // for getcwd()
# define getcwd _getcwd # define getcwd _getcwd
# include <io.h> // isatty() # include <io.h> // isatty()
# define isatty _isatty # define isatty _isatty
# include "Winsock2.h" // for gethostname() # include "winsock2.h" // for gethostname()
#endif #endif
// work around a stdc++ lib bug in some versions of linux, but doesn't // work around a stdc++ lib bug in some versions of linux, but doesn't
@ -269,9 +269,9 @@ bool fgInitFGRoot ( int argc, char **argv ) {
// find fg-root any other way. // find fg-root any other way.
if ( root.empty() ) { if ( root.empty() ) {
#if defined( __CYGWIN__ ) #if defined( __CYGWIN__ )
root = "/FlightGear"; root = "../data";
#elif defined( WIN32 ) #elif defined( _WIN32 )
root = "\\FlightGear"; root = "..\\data";
#elif defined(__APPLE__) #elif defined(__APPLE__)
/* /*
The following code looks for the base package inside the application The following code looks for the base package inside the application
@ -585,7 +585,7 @@ bool fgInitConfig ( int argc, char **argv ) {
} }
SGPropertyNode autosave; SGPropertyNode autosave;
#if defined( _MSC_VER ) || defined( __MINGW32__ ) #ifdef _WIN32
char *envp = ::getenv( "APPDATA" ); char *envp = ::getenv( "APPDATA" );
if (envp != NULL ) { if (envp != NULL ) {
SGPath config( envp ); SGPath config( envp );

View file

@ -59,6 +59,35 @@
#include "WindowBuilder.hxx" #include "WindowBuilder.hxx"
#include "WindowSystemAdapter.hxx" #include "WindowSystemAdapter.hxx"
// Static linking of OSG needs special macros
#ifdef OSG_LIBRARY_STATIC
#include <osgDB/Registry>
USE_GRAPHICSWINDOW();
// Image formats
USE_OSGPLUGIN(bmp);
USE_OSGPLUGIN(dds);
USE_OSGPLUGIN(hdr);
USE_OSGPLUGIN(pic);
USE_OSGPLUGIN(pnm);
USE_OSGPLUGIN(rgb);
USE_OSGPLUGIN(tga);
#ifdef OSG_JPEG_ENABLED
USE_OSGPLUGIN(jpeg);
#endif
#ifdef OSG_PNG_ENABLED
USE_OSGPLUGIN(png);
#endif
#ifdef OSG_TIFF_ENABLED
USE_OSGPLUGIN(tiff);
#endif
// Model formats
USE_OSGPLUGIN(3ds);
USE_OSGPLUGIN(ac);
USE_OSGPLUGIN(ive);
USE_OSGPLUGIN(osg);
USE_OSGPLUGIN(txf);
#endif
// fg_os implementation using OpenSceneGraph's osgViewer::Viewer class // fg_os implementation using OpenSceneGraph's osgViewer::Viewer class
// to create the graphics window and run the event/update/render loop. // to create the graphics window and run the event/update/render loop.

View file

@ -783,7 +783,7 @@ static void fgIdleFunction ( void ) {
# if defined( __CYGWIN__ ) # if defined( __CYGWIN__ )
string command = "start /m `cygpath -w " + mp3file.str() + "`"; string command = "start /m `cygpath -w " + mp3file.str() + "`";
# elif defined( WIN32 ) # elif defined( _WIN32 )
string command = "start /m " + mp3file.str(); string command = "start /m " + mp3file.str();
# else # else
string command = "mpg123 " + mp3file.str() + "> /dev/null 2>&1"; string command = "mpg123 " + mp3file.str() + "> /dev/null 2>&1";

View file

@ -32,7 +32,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> //snprintf #include <stdio.h> //snprintf
#if defined( _MSC_VER ) || defined(__MINGW32__) #ifdef _WIN32
# include <io.h> //lseek, read, write # include <io.h> //lseek, read, write
#endif #endif

View file

@ -348,9 +348,7 @@ bool FGATCOutput::open( int lock_fd ) {
ATCRelease( lock_fd ); ATCRelease( lock_fd );
#if defined( _MSC_VER ) #ifdef _WIN32
ulMilliSecondSleep(33);
#elif defined (WIN32) && !defined(__CYGWIN__)
Sleep (33); Sleep (33);
#else #else
usleep(33); usleep(33);

View file

@ -39,7 +39,7 @@
#if defined( _MSC_VER ) #if defined( _MSC_VER )
# include <windows.h> # include <windows.h>
#elif defined( __MINGW32__ ) #elif defined( __MINGW32__ )
# include <Winsock2.h> # include <winsock2.h>
#else #else
# include <netinet/in.h> // htonl() ntohl() # include <netinet/in.h> // htonl() ntohl()
#endif #endif

View file

@ -42,7 +42,7 @@
#if defined( _MSC_VER ) #if defined( _MSC_VER )
# include <windows.h> # include <windows.h>
#elif defined( __MINGW32__ ) #elif defined( __MINGW32__ )
# include <Winsock2.h> # include <winsock2.h>
#else #else
# include <netinet/in.h> // htonl() ntohl() # include <netinet/in.h> // htonl() ntohl()
#endif #endif

View file

@ -39,8 +39,10 @@
#include "native_gui.hxx" #include "native_gui.hxx"
// FreeBSD works better with this included last ... (?) // FreeBSD works better with this included last ... (?)
#if defined(WIN32) && !defined(__CYGWIN__) #if defined( _MSC_VER )
# include <windows.h> # include <windows.h>
#elif defined( __MINGW32__ )
# include <winsock2.h>
#else #else
# include <netinet/in.h> // htonl() ntohl() # include <netinet/in.h> // htonl() ntohl()
#endif #endif

View file

@ -415,7 +415,7 @@ static naRef f_parsexml(naContext c, naRef me, int argc, naRef* args)
// Return UNIX epoch time in seconds. // Return UNIX epoch time in seconds.
static naRef f_systime(naContext c, naRef me, int argc, naRef* args) static naRef f_systime(naContext c, naRef me, int argc, naRef* args)
{ {
#ifdef WIN32 #ifdef _WIN32
FILETIME ft; FILETIME ft;
GetSystemTimeAsFileTime(&ft); GetSystemTimeAsFileTime(&ft);
double t = (4294967296.0 * ft.dwHighDateTime + ft.dwLowDateTime); double t = (4294967296.0 * ft.dwHighDateTime + ft.dwLowDateTime);

View file

@ -2,7 +2,7 @@
# include <config.h> # include <config.h>
#endif #endif
#if !defined( _MSC_VER ) && !defined( __MINGW32__ ) #ifndef _WIN32
# include <strings.h> // for bzero() # include <strings.h> // for bzero()
#else #else
# define bzero(a,b) memset(a,0,b) # define bzero(a,b) memset(a,0,b)

View file

@ -29,6 +29,10 @@
#include <windows.h> #include <windows.h>
#endif #endif
#ifdef __MINGW32__
#include <time.h>
#include <unistd.h>
#endif
#include <stdlib.h> // atoi() atof() abs() system() #include <stdlib.h> // atoi() atof() abs() system()

View file

@ -8,7 +8,7 @@ fgadmin_SOURCES = \
main.cxx \ main.cxx \
untarka.c untarka.h untarka.c untarka.h
fgadmin_LDADD = -lsgmisc -lplibul -lz fgadmin_LDADD = -lsgmisc -lsgdebug -lplibul -lz
fgadmin.cxx fgadmin.h: fgadmin.fl fgadmin.cxx fgadmin.h: fgadmin.fl
fluid -c fgadmin.fl fluid -c fgadmin.fl

View file

@ -26,7 +26,7 @@
#include <set> #include <set>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef _MSC_VER #ifdef _WIN32
# include <direct.h> # include <direct.h>
#endif #endif

View file

@ -52,7 +52,7 @@
*/ */
#undef DOSISH #undef DOSISH
#if defined(WIN32) || defined(__MINGW32__) || defined(__CYGWIN__) || MSC_VER > 1000 #ifdef WIN32
# include <windows.h> # include <windows.h>
# define DOSISH 1 # define DOSISH 1
# undef __STRICT_ANSI__ # undef __STRICT_ANSI__

View file

@ -20,4 +20,4 @@ fgviewer_SOURCES = fgviewer.cxx
fgviewer_LDADD = \ fgviewer_LDADD = \
-lsgtgdb -lsgmaterial -lsgmodel -lsgbvh -lsgutil -lsgio -lsgbucket \ -lsgtgdb -lsgmaterial -lsgmodel -lsgbvh -lsgutil -lsgio -lsgbucket \
-lsgmath -lsgprops -lsgdebug -lsgmisc -lsgxml -lsgstructure \ -lsgmath -lsgprops -lsgdebug -lsgmisc -lsgxml -lsgstructure \
$(fgviewer_PLIB_LIBS) $(OSG_LIBS) $(opengl_LIBS) $(THREAD_LIBS) -lz $(fgviewer_PLIB_LIBS) $(OSG_LIBS) $(opengl_LIBS) $(thread_LIBS) -lz

View file

@ -126,7 +126,7 @@ int main ( int argc, char ** argv )
/* give other processes a chance */ /* give other processes a chance */
#ifdef WIN32 #ifdef _WIN32
Sleep ( 1 ) ; Sleep ( 1 ) ;
#elif defined(sgi) #elif defined(sgi)
sginap ( 1 ) ; sginap ( 1 ) ;