Changeset 236 for trunk/src/emx/include
- Timestamp:
- May 26, 2003, 4:43:12 PM (22 years ago)
- Location:
- trunk/src/emx/include
- Files:
-
- 1 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/a_out.h
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r235 r236 138 138 /* emx */ 139 139 #define N_IMP1 0x68 /* Import definition symbol */ 140 #define N_IMP2 0x6a /* Import definition symbol */ 140 141 141 142 … … 168 169 unsigned int r_pad:4; 169 170 }; 171 170 172 #endif /* __A_OUT_GNU_H__ */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/asm386.h
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r235 r236 2 2 3 3 #include <sys/errno.h> 4 5 /* Macros for defining standard libc functions */ 6 7 #define _STD(x) __std_ ## x 4 8 5 9 #define _xam fxam; fstsw %ax; andb $0x45, %ah … … 14 18 #if defined (LONG_DOUBLE) 15 19 #define FLD fldt 16 #define MATHSUFFIX1(X) _##X##l17 #define MATHSUFFIX2(X) _ ##X##l18 #define MATHSUFFIX3(X) X##l20 #define MATHSUFFIX1(X) _STD(##X##l) 21 #define MATHSUFFIX2(X) _STD(##X##l) 22 #define MATHSUFFIX3(X) _##X##l 19 23 #define CONV(X) 20 24 #elif defined (FLOAT) 21 25 #define FLD flds 22 #define MATHSUFFIX1(X) _ ##X##f23 #define MATHSUFFIX2(X) _ ##X##f24 #define MATHSUFFIX3(X) X##f26 #define MATHSUFFIX1(X) _STD(##X##f) 27 #define MATHSUFFIX2(X) _STD(##X##f) 28 #define MATHSUFFIX3(X) _##X##f 25 29 #define CONV(X) fstps X; flds X 26 30 #else 27 31 #define FLD fldl 28 #define MATHSUFFIX1(X) X29 #define MATHSUFFIX2(X) _ ##X30 #define MATHSUFFIX3(X) X32 #define MATHSUFFIX1(X) _STD(X) 33 #define MATHSUFFIX2(X) _STD(X) 34 #define MATHSUFFIX3(X) _##X 31 35 #define CONV(X) fstpl X; fldl X 32 36 #endif 33 37 34 #define LABEL0(name) _##name35 #define LABEL(name) LABEL0(name)36 37 38 #define ALIGN .align 2, 0x90 38 39 #if !defined (__MT__)40 41 #define SET_ERRNO_CONST(x) \42 movl x, _errno43 44 #else45 39 46 40 #define SET_ERRNO_CONST(x) \ 47 41 call __errno ;\ 48 42 movl x, (%eax) 49 50 #endif51 43 52 44 #if defined (__GPROF__) … … 73 65 #define FP_INFINITE 3 74 66 #define FP_NAN 4 75 76 /* Macros for defining standard libc functions */77 78 #define CONCAT(x,y) x ## y79 #define _STD(x) CONCAT(__std_,x) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/io.h
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r235 r236 165 165 extern struct fdvec _fdvec_head; 166 166 167 #if defined (__MT__)168 169 167 /* This is currently used only in the multi-thread libraries. We 170 168 can't use and reallocate a single array because rmutex semaphores … … 207 205 208 206 #endif /* defined (_SYS_RMUTEX_H) */ 209 210 #else /* !defined (__MT__) */211 212 #define STREAMV_LOCK (void)0213 #define STREAMV_UNLOCK (void)0214 215 #define STREAM_LOCK(f) (void)0216 #define STREAM_UNLOCK(f) (void)0217 #define STREAM_LOCK_NOWAIT(f) 1218 #define STREAM_UNLOCKED(f) 1219 220 #endif /* !defined (__MT__) */221 207 222 208 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/startup.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r235 r236 8 8 #endif 9 9 10 extern int _CRT_init (void); 11 extern void _CRT_term (void); 12 10 13 /* argv[i][-1] contains some flag bits: */ 11 14 … … 16 19 #define _ARG_NONZERO 0x80 /* Always set, to avoid end of string */ 17 20 18 /* Arrange that FUN will be called by _ startup(). */21 /* Arrange that FUN will be called by _CRT_init(). */ 19 22 20 23 #define _CRT_INIT1(fun) __asm__ (".stabs \"___crtinit1__\", 23, 0, 0, _" #fun); 21 24 22 /* Arrange that FUN will be called by _ cleanup(). */25 /* Arrange that FUN will be called by _CRT_term(). */ 23 26 24 27 #define _CRT_EXIT1(fun) __asm__ (".stabs \"___crtexit1__\", 23, 0, 0, _" #fun); … … 29 32 extern char ** _org_environ; 30 33 31 extern char _cdll_flag;32 33 void _cleanup (void);34 35 34 #if defined (__cplusplus) 36 35 } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/thread.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r235 r236 7 7 extern "C" { 8 8 #endif 9 10 #if defined (__MT__)11 9 12 10 #if !defined (_TM) … … 53 51 struct _thread *_thread (void); 54 52 55 #endif /* defined (__MT__) */56 57 53 58 54 #if defined (__cplusplus) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/umalloc.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r235 r236 598 598 /* Each thread has its own default heap. */ 599 599 600 #if defined (__MT__)601 600 #define _UM_DEFAULT_REGULAR_HEAP tp->_th_rheap 602 601 #define _UM_DEFAULT_TILED_HEAP tp->_th_theap 603 602 #define _UM_MT_DECL struct _thread *tp = _thread (); 604 #else605 #define _UM_DEFAULT_REGULAR_HEAP _um_regular_heap606 #define _UM_DEFAULT_TILED_HEAP _um_tiled_heap607 #define _UM_MT_DECL608 #endif609 603 610 604 /* Note that _um_regular_heap is declared in <umalloc.h>. … … 735 729 static __inline__ void _um_heap_lock (Heap_t h) 736 730 { 737 #if defined (__MT__)738 731 _rmutex_checked_request (&h->rsem, _FMR_IGNINT); 739 #endif740 732 } 741 733 … … 743 735 static __inline__ void _um_heap_unlock (Heap_t h) 744 736 { 745 #if defined (__MT__)746 737 _rmutex_checked_release (&h->rsem); 747 #endif748 738 } 749 739 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/os2thunk.h
-
Property cvs2svn:cvs-rev
changed from
1.2
to1.3
r235 r236 6 6 typedef unsigned long _far16ptr; 7 7 8 _far16ptr _ emx_32to16 (void *ptr);9 void *_ emx_16to32 (_far16ptr ptr);8 _far16ptr _libc_32to16 (void *ptr); 9 void *_libc_16to32 (_far16ptr ptr); 10 10 11 unsigned long _ emx_thunk1 (void *args, void *fun);11 unsigned long _libc_thunk1 (void *args, void *fun); 12 12 13 13 #define _THUNK_PASCAL_PROLOG(SIZE) \ … … 17 17 #define _THUNK_PASCAL_SHORT(ARG) (*--((unsigned short *)_tp) = (ARG)) 18 18 #define _THUNK_PASCAL_LONG(ARG) (*--((unsigned long *)_tp) = (ARG)) 19 #define _THUNK_PASCAL_FLAT(ARG) _THUNK_PASCAL_LONG (_ emx_32to16 (ARG))19 #define _THUNK_PASCAL_FLAT(ARG) _THUNK_PASCAL_LONG (_libc_32to16 (ARG)) 20 20 #define _THUNK_PASCAL_FAR16(ARG) _THUNK_PASCAL_LONG (ARG) 21 21 #define _THUNK_PASCAL_FUNCTION(FUN) APIENTRY _16_##FUN 22 #define _THUNK_PASCAL_CALL(FUN) _ emx_thunk1 (_tb, (void *)(_16_##FUN)); })23 #define _THUNK_PASCAL_CALLI(FUN) _ emx_thunk1 (_tb, (void *)(FUN)); })22 #define _THUNK_PASCAL_CALL(FUN) _libc_thunk1 (_tb, (void *)(_16_##FUN)); }) 23 #define _THUNK_PASCAL_CALLI(FUN) _libc_thunk1 (_tb, (void *)(FUN)); }) 24 24 25 25 #define _THUNK_C_PROLOG(SIZE) \ … … 29 29 #define _THUNK_C_SHORT(ARG) (*((unsigned short *)_tp)++ = (ARG)) 30 30 #define _THUNK_C_LONG(ARG) (*((unsigned long *)_tp)++ = (ARG)) 31 #define _THUNK_C_FLAT(ARG) _THUNK_C_LONG (_ emx_32to16 (ARG))31 #define _THUNK_C_FLAT(ARG) _THUNK_C_LONG (_libc_32to16 (ARG)) 32 32 #define _THUNK_C_FAR16(ARG) _THUNK_C_LONG (ARG) 33 33 #define _THUNK_C_FUNCTION(FUN) _16__##FUN 34 #define _THUNK_C_CALL(FUN) _ emx_thunk1 (_tb, (void *)(_16__##FUN)); })35 #define _THUNK_C_CALLI(FUN) _ emx_thunk1 (_tb, (void *)(FUN)); })34 #define _THUNK_C_CALL(FUN) _libc_thunk1 (_tb, (void *)(_16__##FUN)); }) 35 #define _THUNK_C_CALLI(FUN) _libc_thunk1 (_tb, (void *)(FUN)); }) 36 36 37 37 #define _THUNK_PROLOG(SIZE) _THUNK_PASCAL_PROLOG (SIZE) … … 46 46 47 47 #define MAKE16P(sel,off) ((_far16ptr)((sel) << 16 | (off))) 48 #define MAKEP(sel,off) _ emx_16to32 (MAKE16P (sel, off))48 #define MAKEP(sel,off) _libc_16to32 (MAKE16P (sel, off)) 49 49 #define SELECTOROF(farptr) ((SEL)((farptr) >> 16)) 50 50 #define OFFSETOF(farptr) ((USHORT)(farptr)) -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/stdio.h
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r235 r236 112 112 #if !defined (_VA_LIST) 113 113 #define _VA_LIST 114 typedef char *va_list;114 typedef __builtin_va_list va_list; 115 115 #endif 116 116 … … 159 159 int _rmtmp (void); 160 160 161 int _getc_inline (FILE *);162 int _putc_inline (int, FILE *);163 164 161 extern __inline__ int feof (FILE *_s) 165 162 { … … 172 169 } 173 170 174 /* Do not use this function in application programs! */175 176 extern __inline__ int _getc_inline (FILE *_s)177 {178 return (--_s->_rcount >= 0179 ? (unsigned char)*_s->_ptr++180 : _fill (_s));181 }182 183 /* Do not use this function in application programs! */184 185 extern __inline__ int _putc_inline (int _c, FILE *_s)186 {187 return (--_s->_wcount >= 0 && (_c != '\n' || !(_s->_flags & _IOLBF))188 ? (unsigned char)(*_s->_ptr++ = (char)_c)189 : _flush (_c, _s));190 }191 192 #if defined (__MT__)193 194 171 #define getc(s) fgetc(s) 195 172 #define putc(c,s) fputc(c,s) 196 197 #else198 199 #define getc(s) _getc_inline(s)200 #define putc(c,s) _putc_inline(c,s)201 202 #endif203 173 204 174 extern __inline__ int getchar (void) { return getc (stdin); } -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/stdlib.h
-
Property cvs2svn:cvs-rev
changed from
1.4
to1.5
r235 r236 116 116 #if !defined (_ERRNO) 117 117 #define _ERRNO 118 #if defined (__MT__) || defined (__ST_MT_ERRNO__)119 118 extern int *_errno (void); 120 119 #define errno (*_errno ()) 121 #else122 extern int errno;123 #endif124 120 #endif 125 121 … … 148 144 extern __const__ int sys_nerr; 149 145 150 extern __const__ unsigned int _emx_vcmp;151 extern __const__ unsigned int _emx_env;152 extern __const__ unsigned int _emx_rev;153 146 extern __const__ unsigned char _osminor; 154 147 extern __const__ unsigned char _osmajor; 155 extern __const__ unsigned char _osmode; 156 extern __const__ char _emx_vprt[5]; 157 148 149 /* No DOS support ... */ 150 #define _osmode OS2_MODE 158 151 159 152 unsigned alarm (unsigned); … … 263 256 void _wildcard (int *, char ***); 264 257 265 #if defined (__MT__)266 258 int _beginthread (void (*)(void *), void *, unsigned, void *); 267 259 void _endthread (void); 268 260 void **_threadstore (void); 269 #endif270 261 271 262 #endif -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/string.h
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r235 r236 58 58 char *strdup (__const__ char *); 59 59 int stricmp (__const__ char *, __const__ char *); 60 int strcasecmp (__const__ char *, __const__ char *); 60 61 char *strlwr (char *); 61 62 int strnicmp (__const__ char *, __const__ char *, size_t); 63 int strncasecmp (__const__ char *, __const__ char *, size_t); 62 64 char *strnset (char *, int, size_t); 63 65 char *strrev (char *); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/sys/errno.h
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r235 r236 10 10 #if !defined (__ASSEMBLER__) && !defined (_ERRNO) 11 11 #define _ERRNO 12 #if defined (__MT__) || defined (__ST_MT_ERRNO__)13 12 extern int *_errno (void); 14 13 #define errno (*_errno ()) 15 #else16 extern int errno;17 #endif18 14 #endif 19 15 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/sys/omflib.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r235 r236 10 10 #endif 11 11 12 #ifndef _BYTE_WORD_DWORD 13 #define _BYTE_WORD_DWORD 14 typedef unsigned char byte; 15 typedef unsigned short word; 16 typedef unsigned long dword; 17 #endif /* _BYTE_WORD_DWORD */ 12 18 13 19 #if !defined (THEADR) 14 20 15 #define THEADR 0x80 16 #define LHEADR 0x82 17 #define COMENT 0x88 18 #define MODEND 0x8a 19 #define PUBDEF 0x90 20 #define ALIAS 0xc6 21 #define LIBHDR 0xf0 22 #define LIBEND 0xf1 21 /* OMF record types. To get the 32-bit variant of a record type, add 22 REC32. */ 23 #define THEADR 0x80 /* Translator module header record */ 24 #define COMENT 0x88 /* Comment record */ 25 #define MODEND 0x8a /* Module end record */ 26 #define EXTDEF 0x8c /* External names definition record */ 27 #define TYPDEF 0x8e /* Type definition record */ 28 #define PUBDEF 0x90 /* Public names definition record */ 29 #define LINNUM 0x94 /* Line numbers record */ 30 #define LNAMES 0x96 /* List of names record */ 31 #define SEGDEF 0x98 /* Segment definition record */ 32 #define GRPDEF 0x9a /* Group definition record */ 33 #define FIXUPP 0x9c /* Fixup record */ 34 #define LEDATA 0xa0 /* Logical enumerated data record */ 35 #define LIDATA 0xa2 /* Logical iterated data record */ 36 #define COMDEF 0xb0 /* Communal names definition record */ 37 #define COMDAT 0xc2 /* Common block */ 38 #define ALIAS 0xc6 /* Alias definition record */ 39 #define LIBHDR 0xf0 /* Library header */ 40 #define LIBEND 0xf1 /* Library end */ 23 41 24 #define REC32 0x01 42 /* Add this constant (using the | operator) to get the 32-bit variant 43 of a record type. Some fields will contain 32-bit values instead 44 of 16-bit values. */ 45 #define REC32 0x01 25 46 26 47 #endif -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/sys/uio.h
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r235 r236 48 48 /** @name tcpip40 function mappings. 49 49 * @{ */ 50 #define readv tcpip40_readv51 #define writevtcpip40_writev50 //@@@ name conflict - a.z. #define readv tcpip40_readv 51 //@@@ name conflict - a.z. #define writev tcpip40_writev 52 52 /* @} */ 53 53 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.