Changeset 236 for trunk/src/emx/include


Ignore:
Timestamp:
May 26, 2003, 4:43:12 PM (22 years ago)
Author:
zap
Message:

See ChangeLog.

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 to 1.3
    r235 r236  
    138138/* emx */
    139139#define N_IMP1  0x68            /* Import definition symbol */
     140#define N_IMP2  0x6a            /* Import definition symbol */
    140141
    141142
     
    168169  unsigned int r_pad:4;
    169170};
     171
    170172#endif /* __A_OUT_GNU_H__ */
  • trunk/src/emx/include/emx/asm386.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r235 r236  
    22
    33#include <sys/errno.h>
     4
     5/* Macros for defining standard libc functions */
     6
     7#define _STD(x) __std_ ## x
    48
    59#define _xam fxam; fstsw %ax; andb $0x45, %ah
     
    1418#if defined (LONG_DOUBLE)
    1519#define FLD fldt
    16 #define MATHSUFFIX1(X)   _##X##l
    17 #define MATHSUFFIX2(X)  _##X##l
    18 #define MATHSUFFIX3(X)  X##l
     20#define MATHSUFFIX1(X)  _STD(##X##l)
     21#define MATHSUFFIX2(X)  _STD(##X##l)
     22#define MATHSUFFIX3(X)  _##X##l
    1923#define CONV(X)
    2024#elif defined (FLOAT)
    2125#define FLD flds
    22 #define MATHSUFFIX1(X)  _##X##f
    23 #define MATHSUFFIX2(X)  _##X##f
    24 #define MATHSUFFIX3(X)  X##f
     26#define MATHSUFFIX1(X)  _STD(##X##f)
     27#define MATHSUFFIX2(X)  _STD(##X##f)
     28#define MATHSUFFIX3(X)  _##X##f
    2529#define CONV(X) fstps X; flds X
    2630#else
    2731#define FLD fldl
    28 #define MATHSUFFIX1(X)  X
    29 #define MATHSUFFIX2(X)  _##X
    30 #define MATHSUFFIX3(X)  X
     32#define MATHSUFFIX1(X)  _STD(X)
     33#define MATHSUFFIX2(X)  _STD(X)
     34#define MATHSUFFIX3(X)  _##X
    3135#define CONV(X) fstpl X; fldl X
    3236#endif
    3337
    34 #define LABEL0(name)    _##name
    35 #define LABEL(name)     LABEL0(name)
    36 
    3738#define ALIGN   .align  2, 0x90
    38 
    39 #if !defined (__MT__)
    40 
    41 #define SET_ERRNO_CONST(x) \
    42         movl    x, _errno
    43 
    44 #else
    4539
    4640#define SET_ERRNO_CONST(x) \
    4741        call    __errno ;\
    4842        movl    x, (%eax)
    49 
    50 #endif
    5143
    5244#if defined (__GPROF__)
     
    7365#define FP_INFINITE     3
    7466#define FP_NAN          4
    75 
    76 /* Macros for defining standard libc functions */
    77 
    78 #define CONCAT(x,y) x ## y
    79 #define _STD(x) CONCAT(__std_,x)
  • trunk/src/emx/include/emx/io.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r235 r236  
    165165extern struct fdvec _fdvec_head;
    166166
    167 #if defined (__MT__)
    168 
    169167/* This is currently used only in the multi-thread libraries.  We
    170168   can't use and reallocate a single array because rmutex semaphores
     
    207205
    208206#endif /* defined (_SYS_RMUTEX_H) */
    209 
    210 #else /* !defined (__MT__) */
    211 
    212 #define STREAMV_LOCK            (void)0
    213 #define STREAMV_UNLOCK          (void)0
    214 
    215 #define STREAM_LOCK(f)          (void)0
    216 #define STREAM_UNLOCK(f)        (void)0
    217 #define STREAM_LOCK_NOWAIT(f)   1
    218 #define STREAM_UNLOCKED(f)      1
    219 
    220 #endif /* !defined (__MT__) */
    221207
    222208
  • trunk/src/emx/include/emx/startup.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r235 r236  
    88#endif
    99
     10extern int _CRT_init (void);
     11extern void _CRT_term (void);
     12
    1013/* argv[i][-1] contains some flag bits: */
    1114
     
    1619#define _ARG_NONZERO  0x80          /* Always set, to avoid end of string   */
    1720
    18 /* Arrange that FUN will be called by _startup(). */
     21/* Arrange that FUN will be called by _CRT_init(). */
    1922
    2023#define _CRT_INIT1(fun) __asm__ (".stabs \"___crtinit1__\", 23, 0, 0, _" #fun);
    2124
    22 /* Arrange that FUN will be called by _cleanup(). */
     25/* Arrange that FUN will be called by _CRT_term(). */
    2326
    2427#define _CRT_EXIT1(fun) __asm__ (".stabs \"___crtexit1__\", 23, 0, 0, _" #fun);
     
    2932extern char ** _org_environ;
    3033
    31 extern char _cdll_flag;
    32 
    33 void _cleanup (void);
    34 
    3534#if defined (__cplusplus)
    3635}
  • trunk/src/emx/include/emx/thread.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r235 r236  
    77extern "C" {
    88#endif
    9 
    10 #if defined (__MT__)
    119
    1210#if !defined (_TM)
     
    5351struct _thread *_thread (void);
    5452
    55 #endif /* defined (__MT__) */
    56 
    5753
    5854#if defined (__cplusplus)
  • trunk/src/emx/include/emx/umalloc.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r235 r236  
    598598/* Each thread has its own default heap. */
    599599
    600 #if defined (__MT__)
    601600#define _UM_DEFAULT_REGULAR_HEAP tp->_th_rheap
    602601#define _UM_DEFAULT_TILED_HEAP   tp->_th_theap
    603602#define _UM_MT_DECL              struct _thread *tp = _thread ();
    604 #else
    605 #define _UM_DEFAULT_REGULAR_HEAP _um_regular_heap
    606 #define _UM_DEFAULT_TILED_HEAP   _um_tiled_heap
    607 #define _UM_MT_DECL
    608 #endif
    609603
    610604/* Note that _um_regular_heap is declared in <umalloc.h>.
     
    735729static __inline__ void _um_heap_lock (Heap_t h)
    736730{
    737 #if defined (__MT__)
    738731  _rmutex_checked_request (&h->rsem, _FMR_IGNINT);
    739 #endif
    740732}
    741733
     
    743735static __inline__ void _um_heap_unlock (Heap_t h)
    744736{
    745 #if defined (__MT__)
    746737  _rmutex_checked_release (&h->rsem);
    747 #endif
    748738}
    749739
  • trunk/src/emx/include/os2thunk.h

    • Property cvs2svn:cvs-rev changed from 1.2 to 1.3
    r235 r236  
    66typedef unsigned long _far16ptr;
    77
    8 _far16ptr _emx_32to16 (void *ptr);
    9 void *_emx_16to32 (_far16ptr ptr);
     8_far16ptr _libc_32to16 (void *ptr);
     9void *_libc_16to32 (_far16ptr ptr);
    1010
    11 unsigned long _emx_thunk1 (void *args, void *fun);
     11unsigned long _libc_thunk1 (void *args, void *fun);
    1212
    1313#define _THUNK_PASCAL_PROLOG(SIZE) \
     
    1717#define _THUNK_PASCAL_SHORT(ARG)    (*--((unsigned short *)_tp) = (ARG))
    1818#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))
    2020#define _THUNK_PASCAL_FAR16(ARG)    _THUNK_PASCAL_LONG (ARG)
    2121#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)); })
    2424
    2525#define _THUNK_C_PROLOG(SIZE) \
     
    2929#define _THUNK_C_SHORT(ARG)    (*((unsigned short *)_tp)++ = (ARG))
    3030#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))
    3232#define _THUNK_C_FAR16(ARG)    _THUNK_C_LONG (ARG)
    3333#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)); })
    3636
    3737#define _THUNK_PROLOG(SIZE)  _THUNK_PASCAL_PROLOG (SIZE)
     
    4646
    4747#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))
    4949#define SELECTOROF(farptr) ((SEL)((farptr) >> 16))
    5050#define OFFSETOF(farptr)   ((USHORT)(farptr))
  • trunk/src/emx/include/stdio.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r235 r236  
    112112#if !defined (_VA_LIST)
    113113#define _VA_LIST
    114 typedef char *va_list;
     114typedef __builtin_va_list va_list;
    115115#endif
    116116
     
    159159int _rmtmp (void);
    160160
    161 int _getc_inline (FILE *);
    162 int _putc_inline (int, FILE *);
    163 
    164161extern __inline__ int feof (FILE *_s)
    165162{
     
    172169}
    173170
    174 /* Do not use this function in application programs! */
    175 
    176 extern __inline__ int _getc_inline (FILE *_s)
    177 {
    178   return (--_s->_rcount >= 0
    179           ? (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 
    194171#define getc(s)   fgetc(s)
    195172#define putc(c,s) fputc(c,s)
    196 
    197 #else
    198 
    199 #define getc(s)   _getc_inline(s)
    200 #define putc(c,s) _putc_inline(c,s)
    201 
    202 #endif
    203173
    204174extern __inline__ int getchar (void) { return getc (stdin); }
  • trunk/src/emx/include/stdlib.h

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r235 r236  
    116116#if !defined (_ERRNO)
    117117#define _ERRNO
    118 #if defined (__MT__) || defined (__ST_MT_ERRNO__)
    119118extern int *_errno (void);
    120119#define errno (*_errno ())
    121 #else
    122 extern int errno;
    123 #endif
    124120#endif
    125121
     
    148144extern __const__ int sys_nerr;
    149145
    150 extern __const__ unsigned int _emx_vcmp;
    151 extern __const__ unsigned int _emx_env;
    152 extern __const__ unsigned int _emx_rev;
    153146extern __const__ unsigned char _osminor;
    154147extern __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
    158151
    159152unsigned alarm (unsigned);
     
    263256void _wildcard (int *, char ***);
    264257
    265 #if defined (__MT__)
    266258int _beginthread (void (*)(void *), void *, unsigned, void *);
    267259void _endthread (void);
    268260void **_threadstore (void);
    269 #endif
    270261
    271262#endif
  • trunk/src/emx/include/string.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r235 r236  
    5858char *strdup (__const__ char *);
    5959int stricmp (__const__ char *, __const__ char *);
     60int strcasecmp (__const__ char *, __const__ char *);
    6061char *strlwr (char *);
    6162int strnicmp (__const__ char *, __const__ char *, size_t);
     63int strncasecmp (__const__ char *, __const__ char *, size_t);
    6264char *strnset (char *, int, size_t);
    6365char *strrev (char *);
  • trunk/src/emx/include/sys/errno.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r235 r236  
    1010#if !defined (__ASSEMBLER__) && !defined (_ERRNO)
    1111#define _ERRNO
    12 #if defined (__MT__) || defined (__ST_MT_ERRNO__)
    1312extern int *_errno (void);
    1413#define errno (*_errno ())
    15 #else
    16 extern int errno;
    17 #endif
    1814#endif
    1915
  • trunk/src/emx/include/sys/omflib.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r235 r236  
    1010#endif
    1111
     12#ifndef _BYTE_WORD_DWORD
     13#define _BYTE_WORD_DWORD
     14typedef unsigned char byte;
     15typedef unsigned short word;
     16typedef unsigned long dword;
     17#endif /* _BYTE_WORD_DWORD */
    1218
    1319#if !defined (THEADR)
    1420
    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 */
    2341
    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
    2546
    2647#endif
  • trunk/src/emx/include/sys/uio.h

    • Property cvs2svn:cvs-rev changed from 1.3 to 1.4
    r235 r236  
    4848/** @name tcpip40 function mappings.
    4949 * @{ */
    50 #define readv         tcpip40_readv
    51 #define writev       tcpip40_writev
     50//@@@ name conflict - a.z. #define readv         tcpip40_readv
     51//@@@ name conflict - a.z. #define writev        tcpip40_writev
    5252/* @} */
    5353
Note: See TracChangeset for help on using the changeset viewer.