ObjFW  Diff

Differences From Artifact [0ba93b17bb]:

To Artifact [dd4a5ac59f]:


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
47
48
49
50
51
52
53
54
55
56
57
58
59
60

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#import <objc/objc-api.h>
#ifdef __objc_INCLUDE_GNU

#define SEL_NAME(x) sel_get_name(x)
#else
#import <objc/runtime.h>
#define SEL_NAME(x) sel_getName(x)
#endif

#import "OFExceptions.h"
#import "OFTCPSocket.h"

#ifndef _WIN32
#include <errno.h>
#define GET_ERR	     errno
#ifndef HAVE_GETADDRINFO
#define GET_AT_ERR   h_errno
#else
#define GET_AT_ERR   errno
#endif
#define GET_SOCK_ERR errno
#define ERRFMT	     "Error string was: %s"
#define ERRPARAM     strerror(err)
#ifndef HAVE_GETADDRINFO
#define AT_ERRPARAM  hstrerror(err)
#else
#define AT_ERRPARAM  strerror(err)
#endif
#else
#include <windows.h>
#define GET_ERR	     GetLastError()
#define GET_AT_ERR   WSAGetLastError()
#define GET_SOCK_ERR WSAGetLastError()
#define ERRFMT	     "Error code was: %d"
#define ERRPARAM     err
#define AT_ERRPARAM  err
#endif

#import "asprintf.h"

@implementation OFAllocFailedException
+ (Class)class
{







|
>
|

<
|






|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|







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
47
48
49
50
51
52
53
54
55
56
57
58
59
60

#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#import <objc/objc-api.h>
#ifdef OF_APPLE_RUNTIME
# import <objc/runtime.h>
# define SEL_NAME(x) sel_getName(x)
#else

# define SEL_NAME(x) sel_get_name(x)
#endif

#import "OFExceptions.h"
#import "OFTCPSocket.h"

#ifndef _WIN32
# include <errno.h>
# define GET_ERR	errno
# ifndef HAVE_GETADDRINFO
#  define GET_AT_ERR	h_errno
# else
#  define GET_AT_ERR	errno
# endif
# define GET_SOCK_ERR	errno
# define ERRFMT		"Error string was: %s"
# define ERRPARAM	strerror(err)
# ifndef HAVE_GETADDRINFO
#  define AT_ERRPARAM	hstrerror(err)
# else
#  define AT_ERRPARAM	strerror(err)
# endif
#else
# include <windows.h>
# define GET_ERR	GetLastError()
# define GET_AT_ERR	WSAGetLastError()
# define GET_SOCK_ERR	WSAGetLastError()
# define ERRFMT		"Error code was: %d"
# define ERRPARAM	err
# define AT_ERRPARAM	err
#endif

#import "asprintf.h"

@implementation OFAllocFailedException
+ (Class)class
{