ObjFW  Diff

Differences From Artifact [aa89efc62e]:

To Artifact [9ab19e4a0d]:


32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#import "OFString.h"
#import "OFSystemInfo.h"

#import "OFInitializationFailedException.h"
#import "OFLockFailedException.h"
#import "OFUnlockFailedException.h"

#if !defined(HAVE_STRERROR_R) && defined(OF_HAVE_THREADS)
# import "mutex.h"
#endif

#if defined(OF_WINDOWS) && defined(OF_HAVE_SOCKETS)
# include <winerror.h>
#endif








|







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#import "OFString.h"
#import "OFSystemInfo.h"

#import "OFInitializationFailedException.h"
#import "OFLockFailedException.h"
#import "OFUnlockFailedException.h"

#ifdef OF_HAVE_THREADS
# import "mutex.h"
#endif

#if defined(OF_WINDOWS) && defined(OF_HAVE_SOCKETS)
# include <winerror.h>
#endif

71
72
73
74
75
76
77
78

79



80
81
82
83
84
85
86
#endif

#if !defined(HAVE_STRERROR_R) && defined(OF_HAVE_THREADS)
static of_mutex_t mutex;

OF_CONSTRUCTOR()
{
	if (of_mutex_new(&mutex) != 0)

		@throw [OFInitializationFailedException exception];



}
#endif

OFString *
of_strerror(int errNo)
{
	OFString *ret;







|
>
|
>
>
>







71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#endif

#if !defined(HAVE_STRERROR_R) && defined(OF_HAVE_THREADS)
static of_mutex_t mutex;

OF_CONSTRUCTOR()
{
	OF_ENSURE(of_mutex_new(&mutex) == 0);
}

OF_DESTRUCTOR()
{
	of_mutex_free(&mutex);
}
#endif

OFString *
of_strerror(int errNo)
{
	OFString *ret;