- added some default definitions for constants that may miss in some headers.

- replaced __va_copy with va_copy per Chris's suggestion.
- replaced #include <malloc.h> with #include <stdlib.h> where possible.


SVN r1524 (trunk)
This commit is contained in:
Christoph Oelckers 2009-04-07 07:06:07 +00:00
parent c8e01f9f91
commit a908834a11
22 changed files with 31 additions and 20 deletions

View file

@ -1,4 +1,9 @@
April 6, 2009 (Changes by Graf Zahl) April 7, 2009 (Changes by Graf Zahl)
- added some default definitions for constants that may miss in some headers.
- replaced __va_copy with va_copy per Chris's suggestion.
- replaced #include <malloc.h> with #include <stdlib.h> where possible.
April 6, 2009 (Changes by Graf Zahl)
- Fixed: The UDMF textmap readbuffer was never freed. - Fixed: The UDMF textmap readbuffer was never freed.
April 4, 2009 April 4, 2009

View file

@ -24,7 +24,7 @@
#include "dumb.h" #include "dumb.h"
#include "internal/it.h" #include "internal/it.h"
#include <malloc.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
extern short *DUMBCALLBACK dumb_decode_vorbis(int outlen, const void *oggstream, int sizebytes); extern short *DUMBCALLBACK dumb_decode_vorbis(int outlen, const void *oggstream, int sizebytes);

View file

@ -5,7 +5,7 @@
* bot need to work * * bot need to work *
*******************************/ *******************************/
#include <malloc.h> #include <stdlib.h>
#include "doomtype.h" #include "doomtype.h"
#include "doomdef.h" #include "doomdef.h"

View file

@ -25,7 +25,7 @@
#include <ctype.h> #include <ctype.h>
#include <math.h> #include <math.h>
#include <malloc.h> #include <stdlib.h>
#include "i_system.h" #include "i_system.h"
#include "m_swap.h" #include "m_swap.h"

View file

@ -43,7 +43,7 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <zlib.h> #include <zlib.h>
#include <malloc.h> #include <stdlib.h>
#include "doomtype.h" #include "doomtype.h"
#include "farchive.h" #include "farchive.h"

View file

@ -81,8 +81,11 @@ typedef int SOCKET;
#define WSAGetLastError() errno #define WSAGetLastError() errno
#endif #endif
#ifdef __WIN32__ #ifndef IPPORT_USERRESERVED
#define IPPORT_USERRESERVED 5000 #define IPPORT_USERRESERVED 5000
#endif
#ifdef __WIN32__
typedef int socklen_t; typedef int socklen_t;
#endif #endif

View file

@ -32,7 +32,7 @@
** **
*/ */
#include <malloc.h> #include <stdlib.h>
#include "i_system.h" #include "i_system.h"
#include "dobject.h" #include "dobject.h"

View file

@ -29,7 +29,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <malloc.h> #include <stdlib.h>
#include <time.h> #include <time.h>
#include "doomtype.h" #include "doomtype.h"

View file

@ -39,7 +39,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include <malloc.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>

View file

@ -43,7 +43,7 @@
* Added modulation wheel (vibrato) support * Added modulation wheel (vibrato) support
*/ */
#include <malloc.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#ifdef _WIN32 #ifdef _WIN32
#include <io.h> #include <io.h>

View file

@ -23,7 +23,6 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <malloc.h>
#include "templates.h" #include "templates.h"
#include "doomdef.h" #include "doomdef.h"

View file

@ -44,7 +44,7 @@ extern HWND Window;
#define FALSE 0 #define FALSE 0
#define TRUE 1 #define TRUE 1
#endif #endif
#include <malloc.h> #include <stdlib.h>
#include "templates.h" #include "templates.h"
#include "fmodsound.h" #include "fmodsound.h"

View file

@ -14,7 +14,6 @@
#define FALSE 0 #define FALSE 0
#define TRUE 1 #define TRUE 1
#endif #endif
#include <fmod.h>
#include "tempfiles.h" #include "tempfiles.h"
#include "oplsynth/opl_mus_player.h" #include "oplsynth/opl_mus_player.h"
#include "c_cvars.h" #include "c_cvars.h"

View file

@ -34,6 +34,7 @@ private:
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <wordexp.h> #include <wordexp.h>
#include <signal.h>
int ChildQuit; int ChildQuit;

View file

@ -33,7 +33,7 @@
// HEADER FILES ------------------------------------------------------------ // HEADER FILES ------------------------------------------------------------
#include <malloc.h> #include <stdlib.h>
#include "i_musicinterns.h" #include "i_musicinterns.h"
#include "templates.h" #include "templates.h"
#include "doomdef.h" #include "doomdef.h"

View file

@ -33,7 +33,7 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <stdlib.h>
#include "tempfiles.h" #include "tempfiles.h"
FTempFileName::FTempFileName (const char *prefix) FTempFileName::FTempFileName (const char *prefix)

View file

@ -23,7 +23,7 @@
#include <math.h> #include <math.h>
#include <stdio.h> #include <stdio.h>
#include <malloc.h> #include <stdlib.h>
#include "timidity.h" #include "timidity.h"
#include "c_cvars.h" #include "c_cvars.h"

View file

@ -360,7 +360,7 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, int x, int y, DWORD tag, va_l
more_p = va_arg (tags, va_list *); more_p = va_arg (tags, va_list *);
va_end (tags); va_end (tags);
#ifdef __GNUC__ #ifdef __GNUC__
__va_copy (tags, *more_p); va_copy (tags, *more_p);
#else #else
tags = *more_p; tags = *more_p;
#endif #endif

View file

@ -137,7 +137,7 @@ void STACK_ARGS DCanvas::DrawText (FFont *font, int normalcolor, int x, int y, c
more_p = va_arg (tags, va_list*); more_p = va_arg (tags, va_list*);
va_end (tags); va_end (tags);
#ifdef __GNUC__ #ifdef __GNUC__
__va_copy (tags, *more_p); va_copy (tags, *more_p);
#else #else
tags = *more_p; tags = *more_p;
#endif #endif

View file

@ -45,7 +45,7 @@
//#include <wtsapi32.h> //#include <wtsapi32.h>
#define NOTIFY_FOR_THIS_SESSION 0 #define NOTIFY_FOR_THIS_SESSION 0
#include <malloc.h> #include <stdlib.h>
#ifdef _MSC_VER #ifdef _MSC_VER
#include <eh.h> #include <eh.h>
#include <new.h> #include <new.h>

View file

@ -86,7 +86,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
#include <malloc.h> #include <stdlib.h>
#include <locale.h> #include <locale.h>
#include "zstring.h" #include "zstring.h"

View file

@ -88,6 +88,10 @@ static unsigned int LittleLong(unsigned int x)
// Buffer size for central directory search // Buffer size for central directory search
#define BUFREADCOMMENT (0x400) #define BUFREADCOMMENT (0x400)
#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
// TYPES ------------------------------------------------------------------- // TYPES -------------------------------------------------------------------
typedef struct file_entry_s typedef struct file_entry_s