Removed -rdynamic from MinGW targets, others are compile fixes

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3842 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Lance 2011-07-01 07:27:38 +00:00
parent f022d4d42b
commit f870305702
4 changed files with 11 additions and 7 deletions

View file

@ -277,11 +277,13 @@ ifeq ($(FTE_TARGET),win32)
# Let's make sure we're not chasing our tails with MinGW32 compiler bugs
#RELEASE_CFLAGS=-fno-strict-aliasing -ffast-math -fexpensive-optimizations $(CPUOPTIMIZATIONS)
RELEASE_CFLAGS=$(CPUOPTIMIZATIONS)
DEBUG_CFLAGS=-ggdb -g
endif
ifeq ($(FTE_TARGET),win64)
# Let's make sure we're not chasing our tails with MinGW32 compiler bugs
#RELEASE_CFLAGS=-fno-strict-aliasing -ffast-math -fexpensive-optimizations $(CPUOPTIMIZATIONS)
RELEASE_CFLAGS=$(CPUOPTIMIZATIONS)
DEBUG_CFLAGS=-ggdb -g
endif
ifeq ($(FTE_TARGET),win32_SDL)
# Let's make sure we're not chasing our tails with MinGW32 compiler bugs

View file

@ -489,15 +489,16 @@ void *Sys_GetGameAPI(void *parms)
result = getcwd(curpath, sizeof(curpath)); // do something with result?
Con_DPrintf("Searching for %s\n", gamename);
#warning Search for both gamei386.so and game.so
Con_DPrintf("Searching for %s but not %s\n", agamename, ggamename);
searchpath = 0;
while((searchpath = COM_NextPath(searchpath)))
{
if (searchpath[0] == '/')
snprintf(name, sizeof(name), "%s/%s", searchpath, gamename);
snprintf(name, sizeof(name), "%s/%s", searchpath, agamename);
else
snprintf(name, sizeof(name), "%s/%s/%s", curpath, searchpath, gamename);
snprintf(name, sizeof(name), "%s/%s/%s", curpath, searchpath, agamename);
game_library = dlopen (name, RTLD_LAZY);
if (game_library)

View file

@ -385,7 +385,7 @@ int QDECL Q_vsnprintf(char *buffer, int size, const char *format, va_list argptr
return vsnprintf(buffer, size, format, argptr);
}
int VARGS Com_sprintf(char *buffer, int size, const char *format, ...) LIKEPRINTF(3)
int VARGS Com_sprintf(char *buffer, int size, const char *format, ...)
{
int ret;
va_list argptr;
@ -3335,7 +3335,7 @@ void COM_Init (void)
Cmd_AddCommand ("dir", COM_Dir_f); //q3 like
Cmd_AddCommand ("flocate", COM_Locate_f); //prints the pak or whatever where this file can be found.
Cmd_AddCommand ("version", COM_Version_f); //prints the pak or whatever where this file can be found.
Cmd_AddCommand ("crashme", (void*)1); //debugging feature, makes it jump to an invalid address
COM_InitFilesystem ();

View file

@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
@ -212,6 +212,7 @@ int wildcmp(const char *wild, const char *string); //1 if match
#define Q_strncmp(s1, s2, n) strncmp((s1), (s2), (n))
void VARGS Q_snprintfz (char *dest, size_t size, char *fmt, ...) LIKEPRINTF(3);
int VARGS Com_sprintf(char *buffer, int size, const char *format, ...) LIKEPRINTF(3);
#define Q_strncpyS(d, s, n) do{const char *____in=(s);char *____out=(d);int ____i; for (____i=0;*(____in); ____i++){if (____i == (n))break;*____out++ = *____in++;}if (____i < (n))*____out='\0';}while(0) //only use this when it should be used. If undiciided, use N
#define Q_strncpyN(d, s, n) do{if (n < 0)Sys_Error("Bad length in strncpyz");Q_strncpyS((d), (s), (n));((char *)(d))[n] = '\0';}while(0) //this'll stop me doing buffer overflows. (guarenteed to overflow if you tried the wrong size.)
@ -228,7 +229,7 @@ void QDECL Q_strncpyz(char*d, const char*s, int n);
#define Q_strncatz2(dest, src) Q_strncatz(dest, src, sizeof(dest))
#endif
//#define Q_strncpy Please remove all strncpys
/*#ifndef strncpy
/*#ifndef strncpy
#define strncpy Q_strncpy
#endif*/