cmm: Fix compilation under and for Linux.

git-svn-id: svn://kolibrios.org@7666 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2019-06-04 01:43:34 +00:00
parent 13388e2db3
commit b6b8407c4f
4 changed files with 12 additions and 5 deletions

View File

@ -19,7 +19,7 @@ Path_Libs = -Ld:/TEMP/Dev-Cpp/lib/kos -L $(SDK_DIR)/lib
Add_Libs =
#Link_Libs = -lc -lgcc
Link_Libs = -static -S -nostdlib -T $(SDK_DIR)/lib/app-dynamic.lds \
Link_Libs = -static -S -nostdlib -T $(SDK_DIR)/sources/newlib/app-dynamic.lds \
--image-base 0 -lgcc -ldll -lc.dll
My_Libs = main.o port.o toka.o tokb.o tokc.o toke.o tokr.o errors.o debug.o outobj.o outpe.o disasm.o switch.o outle.o pointer.o new_type.o class.o res.o optreg.o libobj.o

View File

@ -1,6 +1,7 @@
Compiler = gcc
Compiler_Options = -m32 -c -fno-exceptions -D_UNIX_
Compatib_Posix = -Dstricmp=strcasecmp -Dstrnicmp=strncasecmp
Compiler_Options = -m32 -c -fno-exceptions -D_UNIX_ $(Compatib_Posix) -Wno-narrowing
#Compiler_Options = -c -fno-exceptions -O2 -D_WIN32_
#-D: _WIN32_ or _UNIX_

View File

@ -1682,6 +1682,9 @@ FILE *CreateOutPut(char *ext,char *mode)
{
char buf[256];
FILE *diskout;
if (comfile == file_meos)
sprintf(buf,"%s",rawfilename);
else
sprintf(buf,"%s.%s",rawfilename,ext);
if((diskout=fopen(buf,mode))==NULL){
ErrOpenFile(buf);

View File

@ -90,12 +90,15 @@ bool OemToCharA(char*, char*);
bool CharToOemA(char*, char*);
int MultiByteToWideChar(unsigned int,unsigned int,char*,int,wchar_t *,int);
#else
int stricmp(const char*, const char*);
int strnicmp(const char*, const char*, int);
#endif
char* strupr(char* s);
char* strlwr(char* s);
int stricmp(const char*, const char*);
int strnicmp(const char*, const char*, int);
#ifdef _PORT_CPP_