source: trunk/src/msvcrt/emxheader.h@ 9633

Last change on this file since 9633 was 9633, checked in by sandervl, 23 years ago

PF: Msvcrt Wine port with GCC

File size: 2.4 KB
Line 
1#ifndef _EMXSTDDEF_H
2#define _EMXSTDDEF_H
3
4#if !defined (_SIZE_T)
5#define _SIZE_T
6typedef unsigned long size_t;
7#endif
8
9 #ifndef __time_t
10 #define __time_t
11 typedef long time_t;
12 #endif
13
14 #ifndef __tm_t
15 #define __tm_t
16 struct tm
17 {
18 int tm_sec; /* seconds after the minute [0-61] */
19 int tm_min; /* minutes after the hour [0-59] */
20 int tm_hour; /* hours since midnight [0-23] */
21 int tm_mday; /* day of the month [1-31] */
22 int tm_mon; /* months since January [0-11] */
23 int tm_year; /* years since 1900 */
24 int tm_wday; /* days since Sunday [0-6] */
25 int tm_yday; /* days since January 1 [0-365] */
26 int tm_isdst; /* Daylight Saving Time flag */
27 };
28 #endif
29
30 typedef struct _div_t
31 {
32 int quot; /* quotient of integer division */
33 int rem; /* remainder of integer division */
34 } div_t;
35
36 typedef struct _ldiv_t
37 {
38 long int quot; /* quotient of long integer division */
39 long int rem; /* remainder of long integer division */
40 } ldiv_t;
41
42 div_t div( int, int );
43 ldiv_t ldiv( long int, long int );
44
45#define STDIN_FILENO 0
46#define STDOUT_FILENO 1
47#define STDERR_FILENO 2
48
49/* more file._flag flags, but these conflict with Unix */
50#define _IOFBF 0x0000
51#define _IONBF 0x0004
52#define _IOLBF 0x0040
53
54#define EOF (-1)
55#define FILENAME_MAX 260
56#define FOPEN_MAX 20
57#define L_tmpnam 260
58
59#define BUFSIZ 512
60
61#ifndef SEEK_SET
62#define SEEK_SET 0
63#define SEEK_CUR 1
64#define SEEK_END 2
65#endif
66
67#define __ASM_NAME(name) "_" name
68#define __ASM_FUNC(name) ".type " __ASM_NAME(name) ",@function"
69
70#ifdef __GNUC__
71# define __ASM_GLOBAL_FUNC(name,code) \
72 __asm__( ".align 4\n\t" \
73 ".globl " __ASM_NAME(#name) "\n\t" \
74 __ASM_FUNC(#name) "\n" \
75 __ASM_NAME(#name) ":\n\t" \
76 code );
77#else /* __GNUC__ */
78# define __ASM_GLOBAL_FUNC(name,code) \
79 void __asm_dummy_##name(void) { \
80 asm( ".align 4\n\t" \
81 ".globl " __ASM_NAME(#name) "\n\t" \
82 __ASM_FUNC(#name) "\n" \
83 __ASM_NAME(#name) ":\n\t" \
84 code ); \
85 }
86#endif /* __GNUC__ */
87
88#endif
Note: See TracBrowser for help on using the repository browser.