Fix compilation on FreeBSD.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2582 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+267
-261
@@ -154,275 +154,281 @@ typedef unsigned int wint_t;
|
|||||||
|
|
||||||
// errno error numbers. The values used don't matter, as long as they
|
// errno error numbers. The values used don't matter, as long as they
|
||||||
// don't conflict with existing errno error numbers.
|
// don't conflict with existing errno error numbers.
|
||||||
#if defined (PORT_WANT_ERRNO) && defined (USE_WINSOCK)
|
#ifdef PORT_WANT_ERRNO
|
||||||
# include <errno.h>
|
# ifdef USE_WINSOCK
|
||||||
# ifndef E2BIG
|
# include <errno.h>
|
||||||
# define E2BIG 0x01000001
|
# ifndef E2BIG
|
||||||
# endif
|
# define E2BIG 0x01000001
|
||||||
# ifndef EACCES
|
|
||||||
# define EACCES 0x01000002
|
|
||||||
# endif
|
|
||||||
# ifndef EADDRINUSE
|
|
||||||
# define EADDRINUSE 0x01000003
|
|
||||||
# endif
|
|
||||||
# ifndef EADDRNOTAVAIL
|
|
||||||
# define EADDRNOTAVAIL 0x01000004
|
|
||||||
# endif
|
|
||||||
# ifndef EAFNOSUPPORT
|
|
||||||
# define EAFNOSUPPORT 0x01000005
|
|
||||||
# endif
|
|
||||||
# ifndef EAGAIN
|
|
||||||
# ifdef EWOULDBLOCK
|
|
||||||
# define EAGAIN EWOULDBLOCK
|
|
||||||
# else
|
|
||||||
# define EAGAIN 0x01000006
|
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# ifndef EACCES
|
||||||
# ifndef EALREADY
|
# define EACCES 0x01000002
|
||||||
# define EALREADY 0x01000007
|
# endif
|
||||||
# endif
|
# ifndef EADDRINUSE
|
||||||
# ifndef EBADF
|
# define EADDRINUSE 0x01000003
|
||||||
# define EBADF 0x01000008
|
# endif
|
||||||
# endif
|
# ifndef EADDRNOTAVAIL
|
||||||
# ifndef EBADMSG
|
# define EADDRNOTAVAIL 0x01000004
|
||||||
# define EBADMSG 0x01000009
|
# endif
|
||||||
# endif
|
# ifndef EAFNOSUPPORT
|
||||||
# ifndef EBUSY
|
# define EAFNOSUPPORT 0x01000005
|
||||||
# define EBUSY 0x0100000a
|
# endif
|
||||||
# endif
|
# ifndef EAGAIN
|
||||||
# ifndef ECANCELED
|
# ifdef EWOULDBLOCK
|
||||||
# define ECANCELED 0x0100000b
|
# define EAGAIN EWOULDBLOCK
|
||||||
# endif
|
# else
|
||||||
# ifndef ECHILD
|
# define EAGAIN 0x01000006
|
||||||
# define ECHILD 0x0100000c
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# ifndef ECONNABORTED
|
# ifndef EALREADY
|
||||||
# define ECONNABORTED 0x0100000d
|
# define EALREADY 0x01000007
|
||||||
# endif
|
# endif
|
||||||
# ifndef ECONNREFUSED
|
# ifndef EBADF
|
||||||
# define ECONNREFUSED 0x0100000e
|
# define EBADF 0x01000008
|
||||||
# endif
|
# endif
|
||||||
# ifndef ECONNRESET
|
# ifndef EBADMSG
|
||||||
# define ECONNRESET 0x0100000f
|
# define EBADMSG 0x01000009
|
||||||
# endif
|
# endif
|
||||||
# ifndef EDEADLK
|
# ifndef EBUSY
|
||||||
# define EDEADLK 0x01000010
|
# define EBUSY 0x0100000a
|
||||||
# endif
|
# endif
|
||||||
# ifndef EDESTADDRREQ
|
# ifndef ECANCELED
|
||||||
# define EDESTADDRREQ 0x01000011
|
# define ECANCELED 0x0100000b
|
||||||
# endif
|
# endif
|
||||||
# ifndef EDOM
|
# ifndef ECHILD
|
||||||
# define EDOM 0x01000012
|
# define ECHILD 0x0100000c
|
||||||
# endif
|
# endif
|
||||||
|
# ifndef ECONNABORTED
|
||||||
|
# define ECONNABORTED 0x0100000d
|
||||||
|
# endif
|
||||||
|
# ifndef ECONNREFUSED
|
||||||
|
# define ECONNREFUSED 0x0100000e
|
||||||
|
# endif
|
||||||
|
# ifndef ECONNRESET
|
||||||
|
# define ECONNRESET 0x0100000f
|
||||||
|
# endif
|
||||||
|
# ifndef EDEADLK
|
||||||
|
# define EDEADLK 0x01000010
|
||||||
|
# endif
|
||||||
|
# ifndef EDESTADDRREQ
|
||||||
|
# define EDESTADDRREQ 0x01000011
|
||||||
|
# endif
|
||||||
|
# ifndef EDOM
|
||||||
|
# define EDOM 0x01000012
|
||||||
|
# endif
|
||||||
// Reserved in POSIX
|
// Reserved in POSIX
|
||||||
//# ifndef //EDQUOT
|
//# ifndef //EDQUOT
|
||||||
//# define //EDQUOT 0x01000013
|
//# define //EDQUOT 0x01000013
|
||||||
//# endif
|
//# endif
|
||||||
# ifndef EEXIST
|
# ifndef EEXIST
|
||||||
# define EEXIST 0x01000014
|
# define EEXIST 0x01000014
|
||||||
# endif
|
# endif
|
||||||
# ifndef EFAULT
|
# ifndef EFAULT
|
||||||
# define EFAULT 0x01000015
|
# define EFAULT 0x01000015
|
||||||
# endif
|
# endif
|
||||||
# ifndef EFBIG
|
# ifndef EFBIG
|
||||||
# define EFBIG 0x01000016
|
# define EFBIG 0x01000016
|
||||||
# endif
|
# endif
|
||||||
# ifndef EHOSTUNREACH
|
# ifndef EHOSTUNREACH
|
||||||
# define EHOSTUNREACH 0x01000017
|
# define EHOSTUNREACH 0x01000017
|
||||||
# endif
|
# endif
|
||||||
# ifndef EIDRM
|
# ifndef EIDRM
|
||||||
# define EIDRM 0x01000018
|
# define EIDRM 0x01000018
|
||||||
# endif
|
# endif
|
||||||
# ifndef EILSEQ
|
# ifndef EILSEQ
|
||||||
# define EILSEQ 0x01000019
|
# define EILSEQ 0x01000019
|
||||||
# endif
|
# endif
|
||||||
# ifndef EINPROGRESS
|
# ifndef EINPROGRESS
|
||||||
# define EINPROGRESS 0x0100001a
|
# define EINPROGRESS 0x0100001a
|
||||||
# endif
|
# endif
|
||||||
# ifndef EINTR
|
# ifndef EINTR
|
||||||
# define EINTR 0x0100001b
|
# define EINTR 0x0100001b
|
||||||
# endif
|
# endif
|
||||||
# ifndef EINVAL
|
# ifndef EINVAL
|
||||||
# define EINVAL 0x0100001c
|
# define EINVAL 0x0100001c
|
||||||
# endif
|
# endif
|
||||||
# ifndef EIO
|
# ifndef EIO
|
||||||
# define EIO 0x0100001d
|
# define EIO 0x0100001d
|
||||||
# endif
|
# endif
|
||||||
# ifndef EISCONN
|
# ifndef EISCONN
|
||||||
# define EISCONN 0x0100001e
|
# define EISCONN 0x0100001e
|
||||||
# endif
|
# endif
|
||||||
# ifndef EISDIR
|
# ifndef EISDIR
|
||||||
# define EISDIR 0x0100001f
|
# define EISDIR 0x0100001f
|
||||||
# endif
|
# endif
|
||||||
# ifndef ELOOP
|
# ifndef ELOOP
|
||||||
# define ELOOP 0x01000020
|
# define ELOOP 0x01000020
|
||||||
# endif
|
# endif
|
||||||
# ifndef EMFILE
|
# ifndef EMFILE
|
||||||
# define EMFILE 0x01000021
|
# define EMFILE 0x01000021
|
||||||
# endif
|
# endif
|
||||||
# ifndef EMLINK
|
# ifndef EMLINK
|
||||||
# define EMLINK 0x01000022
|
# define EMLINK 0x01000022
|
||||||
# endif
|
# endif
|
||||||
# ifndef EMSGSIZE
|
# ifndef EMSGSIZE
|
||||||
# define EMSGSIZE 0x01000023
|
# define EMSGSIZE 0x01000023
|
||||||
# endif
|
# endif
|
||||||
// Reserved in POSIX
|
// Reserved in POSIX
|
||||||
//# ifndef //EMULTIHOP
|
//# ifndef //EMULTIHOP
|
||||||
//# define //EMULTIHOP 0x01000024
|
//# define //EMULTIHOP 0x01000024
|
||||||
//# endif
|
//# endif
|
||||||
# ifndef ENAMETOOLONG
|
# ifndef ENAMETOOLONG
|
||||||
# define ENAMETOOLONG 0x01000025
|
# define ENAMETOOLONG 0x01000025
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENETDOWN
|
# ifndef ENETDOWN
|
||||||
# define ENETDOWN 0x01000026
|
# define ENETDOWN 0x01000026
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENETRESET
|
# ifndef ENETRESET
|
||||||
# define ENETRESET 0x01000027
|
# define ENETRESET 0x01000027
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENETUNREACH
|
# ifndef ENETUNREACH
|
||||||
# define ENETUNREACH 0x01000028
|
# define ENETUNREACH 0x01000028
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENFILE
|
# ifndef ENFILE
|
||||||
# define ENFILE 0x01000029
|
# define ENFILE 0x01000029
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOBUFS
|
# ifndef ENOBUFS
|
||||||
# define ENOBUFS 0x0100002a
|
# define ENOBUFS 0x0100002a
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENODATA
|
# ifndef ENODATA
|
||||||
# define ENODATA 0x0100002b
|
# define ENODATA 0x0100002b
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENODEV
|
# ifndef ENODEV
|
||||||
# define ENODEV 0x0100002c
|
# define ENODEV 0x0100002c
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOENT
|
# ifndef ENOENT
|
||||||
# define ENOENT 0x0100002d
|
# define ENOENT 0x0100002d
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOEXEC
|
# ifndef ENOEXEC
|
||||||
# define ENOEXEC 0x0100002e
|
# define ENOEXEC 0x0100002e
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOLCK
|
# ifndef ENOLCK
|
||||||
# define ENOLCK 0x0100002f
|
# define ENOLCK 0x0100002f
|
||||||
# endif
|
# endif
|
||||||
// Reserved in POSIX
|
// Reserved in POSIX
|
||||||
//# ifndef ENOLINK
|
//# ifndef ENOLINK
|
||||||
//# define ENOLINK 0x01000030
|
//# define ENOLINK 0x01000030
|
||||||
//# endif
|
//# endif
|
||||||
# ifndef ENOMEM
|
# ifndef ENOMEM
|
||||||
# define ENOMEM 0x01000031
|
# define ENOMEM 0x01000031
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOMSG
|
# ifndef ENOMSG
|
||||||
# define ENOMSG 0x01000032
|
# define ENOMSG 0x01000032
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOPROTOOPT
|
# ifndef ENOPROTOOPT
|
||||||
# define ENOPROTOOPT 0x01000033
|
# define ENOPROTOOPT 0x01000033
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOSPC
|
# ifndef ENOSPC
|
||||||
# define ENOSPC 0x01000034
|
# define ENOSPC 0x01000034
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOSR
|
# ifndef ENOSR
|
||||||
# define ENOSR 0x01000035
|
# define ENOSR 0x01000035
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOSTR
|
# ifndef ENOSTR
|
||||||
# define ENOSTR 0x01000036
|
# define ENOSTR 0x01000036
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOSYS
|
# ifndef ENOSYS
|
||||||
# define ENOSYS 0x01000037
|
# define ENOSYS 0x01000037
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOTCONN
|
# ifndef ENOTCONN
|
||||||
# define ENOTCONN 0x01000038
|
# define ENOTCONN 0x01000038
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOTDIR
|
# ifndef ENOTDIR
|
||||||
# define ENOTDIR 0x01000039
|
# define ENOTDIR 0x01000039
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOTEMPTY
|
# ifndef ENOTEMPTY
|
||||||
# define ENOTEMPTY 0x0100003a
|
# define ENOTEMPTY 0x0100003a
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOTSOCK
|
# ifndef ENOTSOCK
|
||||||
# define ENOTSOCK 0x0100003b
|
# define ENOTSOCK 0x0100003b
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOTSUP
|
# ifndef ENOTSUP
|
||||||
# define ENOTSUP 0x0100003c
|
# define ENOTSUP 0x0100003c
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENOTTY
|
# ifndef ENOTTY
|
||||||
# define ENOTTY 0x0100003d
|
# define ENOTTY 0x0100003d
|
||||||
# endif
|
# endif
|
||||||
# ifndef ENXIO
|
# ifndef ENXIO
|
||||||
# define ENXIO 0x0100003e
|
# define ENXIO 0x0100003e
|
||||||
# endif
|
# endif
|
||||||
# ifndef EOPNOTSUPP
|
# ifndef EOPNOTSUPP
|
||||||
# define EOPNOTSUPP 0x0100003f
|
# define EOPNOTSUPP 0x0100003f
|
||||||
# endif
|
# endif
|
||||||
# ifndef EOVERFLOW
|
# ifndef EOVERFLOW
|
||||||
# define EOVERFLOW 0x01000040
|
# define EOVERFLOW 0x01000040
|
||||||
# endif
|
# endif
|
||||||
# ifndef EPERM
|
# ifndef EPERM
|
||||||
# define EPERM 0x01000041
|
# define EPERM 0x01000041
|
||||||
# endif
|
# endif
|
||||||
# ifndef EPIPE
|
# ifndef EPIPE
|
||||||
# define EPIPE 0x01000042
|
# define EPIPE 0x01000042
|
||||||
# endif
|
# endif
|
||||||
# ifndef EPROTO
|
# ifndef EPROTO
|
||||||
# define EPROTO 0x01000043
|
# define EPROTO 0x01000043
|
||||||
# endif
|
# endif
|
||||||
# ifndef EPROTONOSUPPORT
|
# ifndef EPROTONOSUPPORT
|
||||||
# define EPROTONOSUPPORT 0x01000044
|
# define EPROTONOSUPPORT 0x01000044
|
||||||
# endif
|
# endif
|
||||||
# ifndef EPROTOTYPE
|
# ifndef EPROTOTYPE
|
||||||
# define EPROTOTYPE 0x01000045
|
# define EPROTOTYPE 0x01000045
|
||||||
# endif
|
# endif
|
||||||
# ifndef ERANGE
|
# ifndef ERANGE
|
||||||
# define ERANGE 0x01000046
|
# define ERANGE 0x01000046
|
||||||
# endif
|
# endif
|
||||||
# ifndef EROFS
|
# ifndef EROFS
|
||||||
# define EROFS 0x01000047
|
# define EROFS 0x01000047
|
||||||
# endif
|
# endif
|
||||||
# ifndef ESPIPE
|
# ifndef ESPIPE
|
||||||
# define ESPIPE 0x01000048
|
# define ESPIPE 0x01000048
|
||||||
# endif
|
# endif
|
||||||
# ifndef ESRCH
|
# ifndef ESRCH
|
||||||
# define ESRCH 0x01000049
|
# define ESRCH 0x01000049
|
||||||
# endif
|
# endif
|
||||||
// Reserved in POSIX
|
// Reserved in POSIX
|
||||||
//# ifndef //ESTALE
|
//# ifndef //ESTALE
|
||||||
//# define //ESTALE 0x0100004a
|
//# define //ESTALE 0x0100004a
|
||||||
//# endif
|
//# endif
|
||||||
# ifndef ETIME
|
# ifndef ETIME
|
||||||
# define ETIME 0x0100004b
|
# define ETIME 0x0100004b
|
||||||
# endif
|
# endif
|
||||||
# ifndef ETIMEDOUT
|
# ifndef ETIMEDOUT
|
||||||
# define ETIMEDOUT 0x0100004c
|
# define ETIMEDOUT 0x0100004c
|
||||||
# endif
|
# endif
|
||||||
# ifndef ETXTBSY
|
# ifndef ETXTBSY
|
||||||
# define ETXTBSY 0x0100004d
|
# define ETXTBSY 0x0100004d
|
||||||
# endif
|
# endif
|
||||||
# ifndef EWOULDBLOCK
|
# ifndef EWOULDBLOCK
|
||||||
# ifdef EAGAIN
|
# ifdef EAGAIN
|
||||||
# define EWOULDBLOCK EAGAIN
|
# define EWOULDBLOCK EAGAIN
|
||||||
# else
|
# else
|
||||||
# define EWOULDBLOCK 0x0100004e
|
# define EWOULDBLOCK 0x0100004e
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# ifndef EXDEV
|
||||||
|
# define EXDEV 0x0100004f
|
||||||
# endif
|
# endif
|
||||||
# endif
|
|
||||||
# ifndef EXDEV
|
|
||||||
# define EXDEV 0x0100004f
|
|
||||||
# endif
|
|
||||||
|
|
||||||
// Non-POSIX:
|
// Non-POSIX:
|
||||||
# ifndef EHOSTDOWN
|
# ifndef EHOSTDOWN
|
||||||
# define EHOSTDOWN 0x01100001
|
# define EHOSTDOWN 0x01100001
|
||||||
# endif
|
# endif
|
||||||
# ifndef EPFNOSUPPORT
|
# ifndef EPFNOSUPPORT
|
||||||
# define EPFNOSUPPORT 0x01100002
|
# define EPFNOSUPPORT 0x01100002
|
||||||
# endif
|
# endif
|
||||||
# ifndef EPROCLIM
|
# ifndef EPROCLIM
|
||||||
# define EPROCLIM 0x01100003
|
# define EPROCLIM 0x01100003
|
||||||
# endif
|
# endif
|
||||||
# ifndef ESHUTDOWN
|
# ifndef ESHUTDOWN
|
||||||
# define ESHUTDOWN 0x01100004
|
# define ESHUTDOWN 0x01100004
|
||||||
# endif
|
# endif
|
||||||
# ifndef ESOCKTNOSUPPORT
|
# ifndef ESOCKTNOSUPPORT
|
||||||
# define ESOCKTNOSUPPORT 0x01100005
|
# define ESOCKTNOSUPPORT 0x01100005
|
||||||
# endif
|
# endif
|
||||||
#endif /* defined (PORT_WANT_ERRNO) && defined (_MSC_VER) */
|
# elif defined (__FreeBSD__) || defined (__OpenBSD__)
|
||||||
|
# ifndef EBADMSG
|
||||||
|
# define EBADMSG EIO
|
||||||
|
# endif
|
||||||
|
# endif /* defined (__FreeBSD__) || defined (__OpenBSD__) */
|
||||||
|
#endif /* defined (PORT_WANT_ERRNO) */
|
||||||
|
|
||||||
// Use SDL_INCLUDE and SDL_IMAGE_INCLUDE to portably include the SDL files
|
// Use SDL_INCLUDE and SDL_IMAGE_INCLUDE to portably include the SDL files
|
||||||
// from the right location.
|
// from the right location.
|
||||||
|
|||||||
Reference in New Issue
Block a user