ObjFW  Diff

Differences From Artifact [67fa5dd9c3]:

To Artifact [995314850c]:


38
39
40
41
42
43
44


45

46
47
48
49
50
51
52
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55







+
+

+







#ifdef OF_WINDOWS
# define interface struct
# include <iphlpapi.h>
# undef interface
#endif

#ifdef OF_NINTENDO_3DS
/* Newer versions of libctru started using id as a parameter name. */
# define id id_3ds
# include <3ds.h>
# undef id
#endif

#import "socket_helpers.h"

#if defined(OF_HAIKU)
# define HOSTS_PATH @"/system/settings/network/hosts"
# define RESOLV_CONF_PATH @"/system/settings/network/resolv.conf"
481
482
483
484
485
486
487
488

489
490
491
492






493
494
495
496
497
498
499
484
485
486
487
488
489
490

491




492
493
494
495
496
497
498
499
500
501
502
503
504







-
+
-
-
-
-
+
+
+
+
+
+








	pool = objc_autoreleasePoolPush();

	[self setDefaults];

#if defined(OF_WINDOWS)
# ifdef OF_HAVE_FILES
	path = [[OFWindowsRegistryKey localMachineKey]
	OFWindowsRegistryKey *key = [[OFWindowsRegistryKey localMachineKey]
	    stringForValue: @"DataBasePath"
		subkeyPath: @"SYSTEM\\CurrentControlSet\\Services\\"
			    @"Tcpip\\Parameters"];
	path = [path stringByAppendingPathComponent: @"hosts"];
		   openSubkeyAtPath: @"SYSTEM\\CurrentControlSet\\Services\\"
				     @"Tcpip\\Parameters"
	    securityAndAccessRights: KEY_QUERY_VALUE];
	path = [[[key stringForValue: @"DataBasePath"]
	    stringByAppendingPathComponent: @"hosts"]
	    stringByExpandingWindowsEnvironmentStrings];

	if (path != nil)
		[self parseHosts: path];
# endif

	[self obtainWindowsSystemConfig];
#elif defined(OF_AMIGAOS4)