diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 3f12a453c..492590474 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -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 with #include where possible. + +April 6, 2009 (Changes by Graf Zahl) - Fixed: The UDMF textmap readbuffer was never freed. April 4, 2009 diff --git a/dumb/src/it/readxm.c b/dumb/src/it/readxm.c index 502e0fa14..7d1b4657b 100644 --- a/dumb/src/it/readxm.c +++ b/dumb/src/it/readxm.c @@ -24,7 +24,7 @@ #include "dumb.h" #include "internal/it.h" -#include +#include #include extern short *DUMBCALLBACK dumb_decode_vorbis(int outlen, const void *oggstream, int sizebytes); diff --git a/src/b_func.cpp b/src/b_func.cpp index 8e16d38ce..359d48832 100644 --- a/src/b_func.cpp +++ b/src/b_func.cpp @@ -5,7 +5,7 @@ * bot need to work * *******************************/ -#include +#include #include "doomtype.h" #include "doomdef.h" diff --git a/src/f_finale.cpp b/src/f_finale.cpp index 9295c57a3..23da56625 100644 --- a/src/f_finale.cpp +++ b/src/f_finale.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include "i_system.h" #include "m_swap.h" diff --git a/src/farchive.cpp b/src/farchive.cpp index 4c481da78..b07758323 100644 --- a/src/farchive.cpp +++ b/src/farchive.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include "doomtype.h" #include "farchive.h" diff --git a/src/i_net.cpp b/src/i_net.cpp index 7df97a76e..f8f77fe26 100644 --- a/src/i_net.cpp +++ b/src/i_net.cpp @@ -81,8 +81,11 @@ typedef int SOCKET; #define WSAGetLastError() errno #endif -#ifdef __WIN32__ +#ifndef IPPORT_USERRESERVED #define IPPORT_USERRESERVED 5000 +#endif + +#ifdef __WIN32__ typedef int socklen_t; #endif diff --git a/src/m_alloc.cpp b/src/m_alloc.cpp index 611ed0bbe..a613e8ee2 100644 --- a/src/m_alloc.cpp +++ b/src/m_alloc.cpp @@ -32,7 +32,7 @@ ** */ -#include +#include #include "i_system.h" #include "dobject.h" diff --git a/src/m_misc.cpp b/src/m_misc.cpp index af6849152..1592df6a8 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include "doomtype.h" diff --git a/src/nodebuild.cpp b/src/nodebuild.cpp index b98805959..cd68c49e3 100644 --- a/src/nodebuild.cpp +++ b/src/nodebuild.cpp @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/oplsynth/mlopl.cpp b/src/oplsynth/mlopl.cpp index d5b51018f..3dfbc46db 100644 --- a/src/oplsynth/mlopl.cpp +++ b/src/oplsynth/mlopl.cpp @@ -43,7 +43,7 @@ * Added modulation wheel (vibrato) support */ -#include +#include #include #ifdef _WIN32 #include diff --git a/src/r_things.cpp b/src/r_things.cpp index 11f453fb5..ef300d422 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -23,7 +23,6 @@ #include #include -#include #include "templates.h" #include "doomdef.h" diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 6fa967582..55e6bb453 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -44,7 +44,7 @@ extern HWND Window; #define FALSE 0 #define TRUE 1 #endif -#include +#include #include "templates.h" #include "fmodsound.h" diff --git a/src/sound/i_musicinterns.h b/src/sound/i_musicinterns.h index ec1829bf8..02cfe8747 100644 --- a/src/sound/i_musicinterns.h +++ b/src/sound/i_musicinterns.h @@ -14,7 +14,6 @@ #define FALSE 0 #define TRUE 1 #endif -#include #include "tempfiles.h" #include "oplsynth/opl_mus_player.h" #include "c_cvars.h" diff --git a/src/sound/music_midi_timidity.cpp b/src/sound/music_midi_timidity.cpp index 5483645dd..4765407ad 100644 --- a/src/sound/music_midi_timidity.cpp +++ b/src/sound/music_midi_timidity.cpp @@ -34,6 +34,7 @@ private: #include #include #include +#include int ChildQuit; diff --git a/src/sound/music_mus_midiout.cpp b/src/sound/music_mus_midiout.cpp index fd46dcdfe..dfe86776d 100644 --- a/src/sound/music_mus_midiout.cpp +++ b/src/sound/music_mus_midiout.cpp @@ -33,7 +33,7 @@ // HEADER FILES ------------------------------------------------------------ -#include +#include #include "i_musicinterns.h" #include "templates.h" #include "doomdef.h" diff --git a/src/tempfiles.cpp b/src/tempfiles.cpp index e3c35623f..fb56d02ce 100644 --- a/src/tempfiles.cpp +++ b/src/tempfiles.cpp @@ -33,7 +33,7 @@ */ #include -#include +#include #include "tempfiles.h" FTempFileName::FTempFileName (const char *prefix) diff --git a/src/timidity/resample.cpp b/src/timidity/resample.cpp index ceb29c60f..0ee6aa856 100644 --- a/src/timidity/resample.cpp +++ b/src/timidity/resample.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include "timidity.h" #include "c_cvars.h" diff --git a/src/v_draw.cpp b/src/v_draw.cpp index 27c8bcf43..63529abc4 100644 --- a/src/v_draw.cpp +++ b/src/v_draw.cpp @@ -360,7 +360,7 @@ bool DCanvas::ParseDrawTextureTags (FTexture *img, int x, int y, DWORD tag, va_l more_p = va_arg (tags, va_list *); va_end (tags); #ifdef __GNUC__ - __va_copy (tags, *more_p); + va_copy (tags, *more_p); #else tags = *more_p; #endif diff --git a/src/v_text.cpp b/src/v_text.cpp index 7813494f5..6e7d96b46 100644 --- a/src/v_text.cpp +++ b/src/v_text.cpp @@ -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*); va_end (tags); #ifdef __GNUC__ - __va_copy (tags, *more_p); + va_copy (tags, *more_p); #else tags = *more_p; #endif diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index 7329d2212..f69de57e5 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -45,7 +45,7 @@ //#include #define NOTIFY_FOR_THIS_SESSION 0 -#include +#include #ifdef _MSC_VER #include #include diff --git a/src/zstrformat.cpp b/src/zstrformat.cpp index bcb264904..c048595ab 100644 --- a/src/zstrformat.cpp +++ b/src/zstrformat.cpp @@ -86,7 +86,7 @@ #include #include #include -#include +#include #include #include "zstring.h" diff --git a/tools/zipdir/zipdir.c b/tools/zipdir/zipdir.c index fbe4d2b0b..193b707e1 100644 --- a/tools/zipdir/zipdir.c +++ b/tools/zipdir/zipdir.c @@ -88,6 +88,10 @@ static unsigned int LittleLong(unsigned int x) // Buffer size for central directory search #define BUFREADCOMMENT (0x400) +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + // TYPES ------------------------------------------------------------------- typedef struct file_entry_s