MSVC++ and FreeBSD portability tweaks.
This commit is contained in:
parent
970ca13328
commit
926849a2d3
4 changed files with 19 additions and 2 deletions
|
@ -57,6 +57,7 @@
|
|||
|
||||
FG_USING_STD(deque);
|
||||
FG_USING_STD(vector);
|
||||
FG_USING_NAMESPACE(std);
|
||||
|
||||
#ifndef WIN32
|
||||
typedef struct {
|
||||
|
|
|
@ -64,6 +64,10 @@
|
|||
|
||||
FG_USING_STD(string);
|
||||
|
||||
#ifndef FG_HAVE_NATIVE_SGI_COMPILERS
|
||||
FG_USING_STD(cout);
|
||||
#endif
|
||||
|
||||
puFont guiFnt = 0;
|
||||
fntTexFont *guiFntHandle = 0;
|
||||
|
||||
|
@ -595,7 +599,7 @@ void guiInit()
|
|||
// Install our fast fonts
|
||||
fntpath.append( "typewriter.txf" );
|
||||
guiFntHandle = new fntTexFont ;
|
||||
guiFntHandle -> load ( fntpath.c_str() ) ;
|
||||
guiFntHandle -> load ( (char *)fntpath.c_str() ) ;
|
||||
puFont GuiFont ( guiFntHandle, 15 ) ;
|
||||
puSetDefaultFonts( GuiFont, GuiFont ) ;
|
||||
guiFnt = puGetDefaultLabelFont();
|
||||
|
|
|
@ -109,6 +109,10 @@ void fgSplashUpdate ( double progress ) {
|
|||
int xsize = 480;
|
||||
int ysize = 380;
|
||||
|
||||
if ( !current_view.get_winWidth() || !current_view.get_winHeight() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
xmin = (current_view.get_winWidth() - xsize) / 2;
|
||||
xmax = xmin + xsize;
|
||||
|
||||
|
|
|
@ -2,6 +2,14 @@
|
|||
/* -- for CSci 5502 */
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <Include/config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h> // BSD macro definitions
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>
|
||||
|
@ -45,7 +53,7 @@ void check_master_switch() {
|
|||
|
||||
// check if the host system is free of interactive users
|
||||
int system_free() {
|
||||
#ifndef __FreeBSD__
|
||||
#ifndef BSD
|
||||
struct utmp *uptr;
|
||||
|
||||
setutent();
|
||||
|
|
Loading…
Add table
Reference in a new issue