11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
* Alternatively, it may be distributed under the terms of the GNU General
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include <string.h>
#import "macros.h"
#ifndef _WIN32
# if defined(OF_HAVE_SOCKETS) && !defined(HAVE_THREADSAFE_GETADDRINFO)
# include <netdb.h>
# endif
# include <errno.h>
# define GET_ERRNO errno
# ifdef OF_HAVE_SOCKETS
# ifndef HAVE_THREADSAFE_GETADDRINFO
# define GET_AT_ERRNO h_errno
# else
# define GET_AT_ERRNO errno
# endif
# define GET_SOCK_ERRNO errno
# endif
# define ERRFMT "Error string was: %s"
# define ERRPARAM strerror(_errNo)
# ifdef OF_HAVE_SOCKETS
# ifndef HAVE_THREADSAFE_GETADDRINFO
# define AT_ERRPARAM hstrerror(_errNo)
# else
# define AT_ERRPARAM strerror(_errNo)
# endif
# endif
#else
# include <windows.h>
|
>
|
<
|
|
|
>
|
|
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
* Alternatively, it may be distributed under the terms of the GNU General
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include <string.h>
#include <errno.h>
#import "macros.h"
#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
#ifndef _WIN32
# define GET_ERRNO errno
# ifdef OF_HAVE_SOCKETS
# if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(HAVE_H_ERRNO)
# define GET_AT_ERRNO h_errno
# else
# define GET_AT_ERRNO errno
# endif
# define GET_SOCK_ERRNO errno
# endif
# define ERRFMT "Error string was: %s"
# define ERRPARAM strerror(_errNo)
# ifdef OF_HAVE_SOCKETS
# if !defined(HAVE_THREADSAFE_GETADDRINFO) && defined(HAVE_HSTRERROR)
# define AT_ERRPARAM hstrerror(_errNo)
# else
# define AT_ERRPARAM strerror(_errNo)
# endif
# endif
#else
# include <windows.h>
|