OpenCores
URL https://opencores.org/ocsvn/pcie_ds_dma/pcie_ds_dma/trunk

Subversion Repositories pcie_ds_dma

[/] [pcie_ds_dma/] [trunk/] [soft/] [linux/] [common/] [utils/] [utypes_linux.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dsmv
 
2
#ifndef _UTYPES_LINUX_H_
3
#define _UTYPES_LINUX_H_
4
 
5
#if defined (__LINUX__) || defined(__linux__)
6
 
7
#include <stdint.h>
8
#include <limits.h>
9
 
10
typedef uint8_t   u8,   UINT08, U08, *PU08, BYTE, U8;
11
typedef uint16_t  u16,  UINT16, U16, *PU16, WORD;
12
typedef uint32_t  u32,  UINT32, U32, *PU32;
13
typedef uint64_t  u64,  UINT64, U64, *PU64;
14
typedef int8_t    s8,   SINT08, S08, *PS08;
15
typedef int16_t   s16,  SINT16, S16, *PS16;
16
typedef int32_t   s32,  SINT32, S32, *PS32;
17
typedef int64_t   s64,  SINT64, S64, *PS64, __int64;
18
 
19
//typedef int32_t     LONG;
20
typedef long        LONG;
21
typedef int64_t     __int64;
22
 
23
typedef float           REAL32, *PREAL32;
24
typedef double          REAL64, *PREAL64;
25
 
26
#if !defined(TRUE) && !defined(FALSE)
27
typedef enum { FALSE=0, TRUE=1 } BOOL;
28
#endif
29
 
30
typedef uint8_t   UCHAR, *PUCHAR;
31
typedef uint16_t  USHORT, *PUSHORT;
32
typedef uint32_t  ULONG, *PULONG, *PUINT, UINT;
33
typedef int       HANDLE;
34
typedef void*     HINSTANCE;
35
typedef void*     PVOID;
36
typedef void      VOID;
37
typedef uint32_t  DWORD;
38
typedef int64_t  __int64;
39
 
40
typedef int             SOCKET;
41
typedef char            TCHAR;
42
typedef char*           PTCHAR;
43
typedef char*           LPTSTR;
44
 
45
// added for 64-bit windows driver compatibility
46
typedef char                    BRDCHAR;
47
#define _BRDC(x)                x
48
#define BRDC_strlen             strlen
49
#define BRDC_strcpy             strcpy
50
#define BRDC_strncpy            strncpy
51
#define BRDC_strcmp             strcmp
52
#define BRDC_stricmp            _stricmp
53
#define BRDC_strnicmp           _strnicmp
54
#define BRDC_strcat             strcat
55
#define BRDC_strchr             strchr
56
#define BRDC_strstr             strstr
57
#define BRDC_strtol             strtol
58
#define BRDC_strtod             strtod
59
#define BRDC_atol               atol
60
#define BRDC_atoi               atoi
61
#define BRDC_atoi64             atoll
62
#define BRDC_atof               atof
63
#define BRDC_printf             printf
64
#define BRDC_fprintf            fprintf
65
#define BRDC_sprintf            sprintf
66
#define BRDC_vsprintf           vsprintf
67
#define BRDC_sscanf             sscanf
68
#define BRDC_fopen              fopen
69
#define BRDC_sopen              sopen
70
#define BRDC_fgets              fgets
71
#define BRDC_getenv             getenv
72
#define BRDC_main               main
73
#define BRDC_fputs              fputs
74
 
75
//-------------------------------------
76
 
77
#define lstrcpy strcpy
78
#define lstrcpyA strcpy
79
#define lstrcat strcat
80
#define lstrcatA strcat
81
#define lstrlen strlen
82
#define lstrlenA strlen
83
#define lstrcmpi strcasecmp
84
#define _tcsstr strstr
85
#define _tcscpy_s strcpy
86
#define _tcscpy strcpy
87
#define _tcschr strchr
88
#define sprintf_s sprintf
89
#define _tcscat_s strcat
90
#define _tcslen strlen
91
#define _tcscpy strcpy
92
 
93
#define _T(x)       x
94
#define _TEXT(x)    x
95
#define INFINITE    (-1)
96
 
97
#define _stricmp strcmp
98
#define stricmp strcmp
99
#define _strnicmp strncmp
100
 
101
typedef const char*     LPCTSTR;
102
typedef char*           PCTSTR;
103
typedef char*           PTSTR;
104
typedef void*           LPVOID;
105
typedef int             LPOVERLAPPED;
106
 
107
#ifndef MAX_PATH
108
#define MAX_PATH PATH_MAX
109
#endif
110
 
111
#endif /* __linux__ */
112
 
113
#endif /* _UTYPES_LINUX_H_ */
114
 
115
/*
116
*  End of File
117
*/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.