Define the u_{char,short,int,long} in msvcrt/sys/types.h for Unix
compatibility (needed by winsock.h as well).
This commit is contained in:
parent
9c2c288139
commit
76883a8cb6
|
@ -55,6 +55,14 @@ typedef long MSVCRT(time_t);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USE_MSVCRT_PREFIX
|
#ifndef USE_MSVCRT_PREFIX
|
||||||
|
#ifndef MSVCRT_BSD_TYPES_DEFINED
|
||||||
|
typedef unsigned char u_char;
|
||||||
|
typedef unsigned short u_short;
|
||||||
|
typedef unsigned int u_int;
|
||||||
|
typedef unsigned long u_long;
|
||||||
|
#define MSVCRT_BSD_TYPES_DEFINED
|
||||||
|
#endif
|
||||||
|
|
||||||
#define dev_t _dev_t
|
#define dev_t _dev_t
|
||||||
#define ino_t _ino_t
|
#define ino_t _ino_t
|
||||||
#define mode_t _mode_t
|
#define mode_t _mode_t
|
||||||
|
|
|
@ -57,27 +57,15 @@ extern "C" {
|
||||||
* This section defines the items that conflict with the Unix headers.
|
* This section defines the items that conflict with the Unix headers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __WINE_USE_MSVCRT
|
#include <sys/types.h>
|
||||||
/* Get the u_xxx types from the Unix headers. They will do and doing it
|
/* On FreeBSD we may get macros and prototypes for htonl & co.
|
||||||
* this way will avoid redefinitions. But on FreeBSD we may get macros
|
* This means the functions will not be called because of the macros.
|
||||||
* and prototypes for htonl & co. This means the functions will not be
|
* So this should not harm us too much unless we try to define our own
|
||||||
* called because of the macros. So this should not harm us too much unless
|
* prototypes (different calling convention).
|
||||||
* we try to define our own prototypes (different calling convention).
|
|
||||||
*/
|
*/
|
||||||
# include <sys/types.h>
|
#if defined(USE_WS_PREFIX) || !defined(htonl)
|
||||||
# if defined(USE_WS_PREFIX) || !defined(htonl)
|
|
||||||
# define WS_DEFINE_HTONL
|
|
||||||
# endif /* htonl */
|
|
||||||
#else
|
|
||||||
/* Since we are using the MSVCRT headers, we must define the u_xxx
|
|
||||||
* types ourselves.
|
|
||||||
*/
|
|
||||||
typedef unsigned char u_char;
|
|
||||||
typedef unsigned short u_short;
|
|
||||||
typedef unsigned int u_int;
|
|
||||||
typedef unsigned long u_long;
|
|
||||||
# define WS_DEFINE_HTONL
|
# define WS_DEFINE_HTONL
|
||||||
#endif /* __WINE_USE_MSVCRT */
|
#endif /* htonl */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue