Changeset 566
- Timestamp:
- Aug 10, 2003, 5:24:21 PM (22 years ago)
- Location:
- trunk/src/emx
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/Makefile
-
Property cvs2svn:cvs-rev
changed from
1.31
to1.32
r565 r566 15 15 # 16 16 # For a brief description of how build system works please read build.txt 17 # 18 # Bootstrapping sequence using EMX gcc compiler: 19 # 20 # 1. Backup include/ctype.h and rename include/ctype.h-bootstrap to 21 # include/ctype.h 22 # 2. Run 'make os2', put the resulting library os2.a to emx/lib as _os2.a, 23 # and convert it to .lib with emxomf: 'emxomf _os2.a' 24 # 3. Now compile everything you wish this way: 'make LIBS=-l_os2' 25 # 17 26 18 27 # Build type control variables. You can set them right from command line, … … 67 76 CC = gcc -c -Zmt 68 77 # The C compiler flags 69 CFLAGS.INC = -Iinclude -Isrc/include78 CFLAGS.INC += -Iinclude -Isrc/include 70 79 CFLAGS = -Wall -mstack-arg-probe $(CFLAGS.INC) $(CFLAGS.$(MODE)) $(CFLAGS.KIND) 71 80 # The additional C compiler flags for different build modes … … 86 95 LD = gcc 87 96 # Linker flags 88 LDFLAGS = $(LDFLAGS.$(MODE)) $(LDFLAGS.KIND) -Zmap -Zstack 1024 97 LDFLAGS = $(LDFLAGS.$(MODE)) $(LDFLAGS.KIND) -Zmap -Zstack 1024 $(LIBS) 89 98 LDFLAGS.DLL = $(LDFLAGS) -Zdll 90 99 # Linker flags for different build modes … … 167 176 EMXOMF = `test -f '$.$(TOOLFMT)/emxomf$E' && echo '$.$(TOOLFMT)/'`emxomf$E 168 177 DO.EMXOMF = $(EMXOMF) $(strip $1 -o) $@ $(if $<,$<, $(subst /omf/,/aout/,$(@:.obj=.o)) ) 178 179 # How to copy some file to installation directory 180 # In optimize mode we have to strip the libraries after copying 181 INSTALL=$(call CP,$1,$2) 182 ifeq ($(MODE),opt) 183 INSTALL += $(if $(filter-out %.a,$2),$(NL)strip --strip-debug $2) 184 INSTALL += $(if $(filter-out %.lib,$2),$(NL)emxomf -s $2) 185 endif 169 186 170 187 # How to filter just the object files from $^ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/ctype.h
-
Property cvs2svn:cvs-rev
changed from
1.8
to1.9
r565 r566 1 /* 2 Locale support implementation through OS/2 Unicode API. 3 Copyright (c) 2003 InnoTek Systemberatung GmbH 4 5 For conditions of distribution and use, see the file COPYING. 6 7 Character type querying. 8 */ 1 /* ctype.h (emx+gcc) */ 9 2 10 3 #ifndef _CTYPE_H … … 15 8 #endif 16 9 17 #include <sys/locale.h> 10 extern unsigned char _ctype[]; 18 11 19 static inline int isalnum (int _c) 20 { return __locale_ctype.cflags [_c & 0xff] & (__UPPER|__LOWER|__DIGIT); } 12 #define _UPPER 0x01 13 #define _LOWER 0x02 14 #define _DIGIT 0x04 15 #define _XDIGIT 0x08 16 #define _CNTRL 0x10 17 #define _SPACE 0x20 18 #define _PUNCT 0x40 19 #define _PRINT 0x80 21 20 22 static inline int isalpha (int _c) 23 { return __locale_ctype.cflags [_c & 0xff] & (__UPPER|__LOWER); } 21 extern inline int isalnum (int _c) 22 { return (_ctype+1)[_c] & (_UPPER|_LOWER|_DIGIT); } 23 extern inline int isalpha (int _c) 24 { return (_ctype+1)[_c] & (_UPPER|_LOWER); } 25 extern inline int iscntrl (int _c) 26 { return (_ctype+1)[_c] & (_CNTRL); } 27 extern inline int isdigit (int _c) 28 { return (_ctype+1)[_c] & (_DIGIT); } 29 extern inline int isgraph (int _c) 30 { return (_ctype+1)[_c] & (_PUNCT|_UPPER|_LOWER|_DIGIT); } 31 extern inline int islower (int _c) 32 { return (_ctype+1)[_c] & (_LOWER); } 33 extern inline int isprint (int _c) 34 { return (_ctype+1)[_c] & (_PRINT); } 35 extern inline int ispunct (int _c) 36 { return (_ctype+1)[_c] & (_PUNCT); } 37 extern inline int isspace (int _c) 38 { return (_ctype+1)[_c] & (_SPACE); } 39 extern inline int isupper (int _c) 40 { return (_ctype+1)[_c] & (_UPPER); } 41 extern inline int isxdigit (int _c) 42 { return (_ctype+1)[_c] & (_XDIGIT); } 24 43 25 static inline int iscntrl (int _c) 26 { return __locale_ctype.cflags [_c & 0xff] & (__CNTRL); } 27 28 static inline int isdigit (int _c) 29 { return __locale_ctype.cflags [_c & 0xff] & (__DIGIT); } 30 31 static inline int isgraph (int _c) 32 { return __locale_ctype.cflags [_c & 0xff] & (__PUNCT|__UPPER|__LOWER|__DIGIT); } 33 34 static inline int islower (int _c) 35 { return __locale_ctype.cflags [_c & 0xff] & (__LOWER); } 36 37 static inline int isprint (int _c) 38 { return __locale_ctype.cflags [_c & 0xff] & (__PRINT); } 39 40 static inline int ispunct (int _c) 41 { return __locale_ctype.cflags [_c & 0xff] & (__PUNCT); } 42 43 static inline int isspace (int _c) 44 { return __locale_ctype.cflags [_c & 0xff] & (__SPACE); } 45 46 static inline int isupper (int _c) 47 { return __locale_ctype.cflags [_c & 0xff] & (__UPPER); } 48 49 static inline int isxdigit (int _c) 50 { return __locale_ctype.cflags [_c & 0xff] & (__XDIGIT); } 51 52 static inline int toupper (int _c) 53 { return __locale_ctype.upcase [_c & 0xff]; } 54 55 static inline int tolower (int _c) 56 { return __locale_ctype.locase [_c & 0xff]; } 57 58 #if !defined (__STRICT_ANSI__) && !defined (_POSIX_SOURCE) 59 60 #define isascii(c) (!((c) & 0x80)) 61 #define toascii(c) ((c) & 0x7f) 62 44 #if !defined (_CTYPE_FUN) 45 extern __inline__ int _toupper (int _c) { return (_c-'a'+'A'); } 46 extern __inline__ int _tolower (int _c) { return (_c-'A'+'a'); } 47 extern __inline__ int toupper(int _c) 48 {return (islower(_c) ? _toupper(_c) : _c);} 49 extern __inline__ int tolower(int _c) 50 {return (isupper(_c) ? _tolower(_c) : _c);} 63 51 #endif 64 52 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/sys/cdefs.h
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r565 r566 399 399 #define __TCPPROTO(args) __P(args) 400 400 401 /* For backward compatibility with GCC/EMX */ 402 #ifndef _System 403 #define _System 404 #endif 405 401 406 #endif /* !_SYS_CDEFS_H_ */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/unidef.h
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r565 r566 38 38 #endif 39 39 #ifndef APIENTRY 40 #define APIENTRY _System 40 # ifdef _System 41 # define APIENTRY _System 42 # else 43 # define APIENTRY 44 # endif 41 45 #endif 42 46 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxbind/emxbind.c
-
Property cvs2svn:cvs-rev
changed from
1.7
to1.8
r565 r566 471 471 file_name (out_fname, (dll_flag ? "dll" : "exe"), 472 472 (opt_o != NULL ? opt_o : inp_fname)); 473 if (str casecmp (inp_fname, out_fname) == 0)473 if (stricmp (inp_fname, out_fname) == 0) 474 474 error ("The input and output files have the same name"); 475 475 break; -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxomf/emxomfar.c
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.7
r565 r566 382 382 _remext (bak_fname); 383 383 _defext (bak_fname, "bak"); 384 if (str casecmp (lib_fname, bak_fname) == 0)384 if (stricmp (lib_fname, bak_fname) == 0) 385 385 { 386 386 fprintf (stderr, "Cannot update backup file\n"); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/emxomf/emxomfld.c
-
Property cvs2svn:cvs-rev
changed from
1.24
to1.25
r565 r566 164 164 165 165 /* To avoid including os2.h... */ 166 #ifdef _System 167 unsigned _System DosCopy (char *, char *, unsigned); 168 #else 169 unsigned DosCopy (char *, char *, unsigned); 166 #ifndef _System 167 #define _System 170 168 #endif 171 169 extern int _System DosCopy (char *, char *, int); 172 170 173 171 /* Tell the user how to run this program. */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/ld/ld.c
-
Property cvs2svn:cvs-rev
changed from
1.9
to1.10
r565 r566 46 46 #endif 47 47 48 /* old gcc will warn on __attribute__((system)) but still will compile */ 49 extern int __attribute__((system)) DosCopy (char *, char *, int); 48 #ifndef _System 49 #define _System 50 #endif 51 extern int _System DosCopy (char *, char *, int); 50 52 51 53 /* We need .data of every module aligned to at least 16 bound -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/src/lib/startup/dllinit.c
-
Property cvs2svn:cvs-rev
changed from
1.7
to1.8
r565 r566 8 8 extern void __ctordtorInit (void); 9 9 extern void __ctordtorTerm (void); 10 extern void __ehInit (void); 11 #pragma weak __ehInit 12 extern void __ehTerm (void); 13 #pragma weak __ehTerm 14 15 #ifndef _System 16 # define _System 17 #endif 10 18 11 19 /** 12 * This is the typical DLL startup code. __ehInit DLL and __ehTermDLLis called13 * are for exception handler stuff in gcc, the two functions will be linked if 14 * there is exception handler info in the module. (Btw. if these calls wasn't 20 * This is the typical DLL startup code. __ehInit and __ehTerm is called 21 * are for exception handler stuff in gcc, the two functions will be linked if 22 * there is exception handler info in the module. (Btw. if these calls wasn't 15 23 * made we would fail to catch exceptions in C++ code.) 16 24 * @returns 1 on success. … … 34 42 * trouble. Before too long we should put back this code. 35 43 */ 36 if (__ehInit DLL)37 __ehInit DLL();44 if (__ehInit) 45 __ehInit (); 38 46 #endif 39 47 __ctordtorInit (); … … 42 50 __ctordtorTerm (); 43 51 #if 0 /* weaks aren't working at the moment */ 44 if (__ehTerm DLL)45 __ehTerm DLL();52 if (__ehTerm) 53 __ehTerm (); 46 54 #endif 47 55 return 1; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.