apply the "final" borland c patches from our Jukka Sorjonen

This commit is contained in:
Bill Currie 2000-05-03 05:12:18 +00:00
parent 32d25d8567
commit a05d712277
9 changed files with 243 additions and 6 deletions

View file

@ -45,9 +45,13 @@
#define Q_strncmp(s1, s2, n) strncmp((s1), (s2), (n))
#ifdef _WIN32
#ifdef __BORLANDC__
#define Q_strcasecmp(s1, s2) stricmp((s1), (s2))
#define Q_strncasecmp(s1, s2, n) strnicmp((s1), (s2), (n))
#else
#define Q_strcasecmp(s1, s2) _stricmp((s1), (s2))
#define Q_strncasecmp(s1, s2, n) _strnicmp((s1), (s2), (n))
#endif
#else

View file

@ -164,7 +164,11 @@ Qdopen(int fd, const char *mode)
}
}
#ifdef WIN32
#ifdef __BORLANDC__
setmode(_fileno(file->file),O_BINARY);
#else
_setmode(_fileno(file->file),_O_BINARY);
#endif
#endif
return file;
}

View file

@ -90,7 +90,10 @@ LPDIRECTSOUNDBUFFER pDSBuf, pDSPBuf;
HINSTANCE hInstDS;
qboolean SNDDMA_InitDirect (void);
#ifdef HAVE_DSOUND
sndinitstat SNDDMA_InitDirect (void);
#endif
qboolean SNDDMA_InitWav (void);

View file

@ -861,7 +861,7 @@ void SV_ClipToLinks ( areanode_t *node, moveclip_t *clip )
|| clip->boxmaxs[2] < touch->v.absmin[2] )
continue;
if (clip->passedict && clip->passedict->v.size[0] && !touch->v.size[0])
if (clip->passedict!=0 && clip->passedict->v.size[0] && !touch->v.size[0])
continue; // points never interact
// might intersect, so do an exact clip

View file

@ -69,7 +69,11 @@ char *Sys_ConsoleInput (void)
int c;
// read a line out
#ifdef __BORLANDC__
while (kbhit())
#else
while (_kbhit())
#endif
{
c = _getch();
putch (c);

View file

@ -389,7 +389,7 @@ void SV_AddGravity (edict_t *ent)
eval_t *val;
val = GetEdictFieldValue(ent, "gravity");
if (val && val->_float)
if (val!=0 && val->_float)
ent_gravity = val->_float;
else
ent_gravity = 1.0;

View file

@ -52,7 +52,7 @@ float *angles;
float *origin;
float *velocity;
int onground;
extern int onground;
usercmd_t cmd;

View file

@ -50,7 +50,7 @@ static double pfreq;
static double curtime = 0.0;
static double lastcurtime = 0.0;
static int lowshift;
qboolean isDedicated;
extern qboolean isDedicated;
static qboolean sc_return_on_enter = false;
HANDLE hinput, houtput;

222
win32/borlandc/config.h Normal file
View file

@ -0,0 +1,222 @@
/* common/config.h.in. Generated automatically from configure.in by autoheader. */
/* Define to empty if the keyword does not work. */
#undef const
/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you have the vprintf function. */
#define HAVE_VPRINTF
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
/* Define if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Define if your <sys/time.h> declares struct tm. */
#undef TM_IN_SYS_TIME
/* Define if your processor stores words with the most significant
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
/* Define if the X Window System is missing or not being used. */
#define X_DISPLAY_MISSING
/* Version string */
#define VERSION "2.40"
#define QF_VERSION "0.2.0-pre"
/* Define if you want to use QF-style defaults instead of Id-style */
#undef NEWSTYLE
/* Define this to the subdirectory name of the default game */
#ifdef NEWSTYLE
# define GAMENAME "base"
#else
# define GAMENAME "id1"
#endif
/* Define if you have the XFree86 DGA extension */
#undef HAS_DGA
/* If your version of OpenGL uses APIENTRY, define GLAPIENTRY to be APIENTRY*/
#define GLAPIENTRY APIENTRY
/* Define this to something sane if you don't have stricmp */
#undef stricmp
/* Define this if you are using Mesa */
#undef XMESA
/* Define this if you have GL_COLOR_INDEX8_EXT in GL/gl.h */
#undef HAVE_GL_COLOR_INDEX8_EXT
/* Define this if C symbols are prefixed with an underscore */
#define HAVE_SYM_PREFIX_UNDERSCORE
/* Define this if you have a Linux-style CD-ROM API */
#undef USE_LINUX_CD
/* Define this if you have a BSD-style CD-ROM API */
#undef USE_BSD_CD
/* Define if you have the _ftime function. */
#define HAVE__FTIME
/* Define if you have the _snprintf function. */
#undef HAVE__SNPRINTF
/* Define if you have the _vsnprintf function. */
#undef HAVE__VSNPRINTF
/* Define if you have the connect function. */
#define HAVE_CONNECT
/* Define if you have the fcntl function. */
#undef HAVE_FCNTL
/* Define if you have the ftime function. */
#define HAVE_FTIME
/* Define if you have the gethostbyname function. */
#define HAVE_GETHOSTBYNAME
/* Define if you have the gethostname function. */
#define HAVE_GETHOSTNAME
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the gettimeofday function. */
#undef HAVE_GETTIMEOFDAY
/* Define if you have the getwd function. */
#undef HAVE_GETWD
/* Define if you have the mkdir function. */
#define HAVE_MKDIR
/* Define if you have the putenv function. */
#define HAVE_PUTENV
/* Define if you have the select function. */
#define HAVE_SELECT
/* Define if you have the snprintf function. */
#define HAVE_SNPRINTF
/* Define if you have the socket function. */
#define HAVE_SOCKET
/* Define if you have the stat function. */
#define HAVE_STAT
/* Define if you have the strerror function. */
#define HAVE_STRERROR
/* Define if you have the strstr function. */
#define HAVE_STRSTR
/* Define if you have the vsnprintf function. */
#define HAVE_VSNPRINTF
/* Define if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define if you have the <dsound.h> header file. */
#define HAVE_DSOUND_H
/* Define if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H
//#undef HAVE_FCNTL_H
/* Define if you have the <initguid.h> header file. */
#define HAVE_INITGUID_H
/* Define if you have the <linux/soundcard.h> header file. */
#undef HAVE_LINUX_SOUNDCARD_H
/* Define if you have the <machine/soundcard.h> header file. */
#undef HAVE_MACHINE_SOUNDCARD_H
/* Define if you have the <mme/mme_public.h> header file. */
#undef HAVE_MME_MME_PUBLIC_H
/* Define if you have the <mme/mmsystem.h> header file. */
#undef HAVE_MME_MMSYSTEM_H
/* Define if you have the <mmsystem.h> header file. */
#define HAVE_MMSYSTEM_H
/* Define if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define if you have the <sys/asoundlib.h> header file. */
#undef HAVE_SYS_ASOUNDLIB_H
/* Define if you have the <sys/audioio.h> header file. */
#undef HAVE_SYS_AUDIOIO_H
/* Define if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
/* Define if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define if you have the <sys/mman.h> header file. */
#undef HAVE_SYS_MMAN_H
/* Define if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H
/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <sys/timeb.h> header file. */
#define HAVE_SYS_TIMEB_H
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the <windows.h> header file. */
#define HAVE_WINDOWS_H
/* Define if you have the Xxf86dga library (-lXxf86dga). */
#undef HAVE_LIBXXF86DGA
/* Define if you have the Xxf86vm library (-lXxf86vm). */
#undef HAVE_LIBXXF86VM
/* Define if you have the db library (-ldb). */
#undef HAVE_LIBDB
/* Define if you have the m library (-lm). */
#undef HAVE_LIBM
/* Define if you want the QSG standards */
#define QSG_STANDARD "1"
/* Define what the base path should be */
#define FS_BASEPATH "."
/* Define the name of the global config file */
#define GLOBAL_CFG_FILE ".\\qforge.conf"
/* Posix, needed for limits.h and Unix stuffs */
#define _POSIX_