Przeglądaj źródła

Updated for arm64

Pierre-Olivier Latour 11 lat temu
rodzic
commit
0f2f22a1b0

+ 1 - 1
CGDWebServer/GCDWebServer.m

@@ -244,7 +244,7 @@ static void _NetServiceClientCallBack(CFNetServiceRef service, CFStreamError* er
         }
         
         if (name) {
-          _service = CFNetServiceCreate(kCFAllocatorDefault, CFSTR("local."), CFSTR("_http._tcp"), (ARC_BRIDGE CFStringRef)name, _port);
+          _service = CFNetServiceCreate(kCFAllocatorDefault, CFSTR("local."), CFSTR("_http._tcp"), (ARC_BRIDGE CFStringRef)name, (SInt32)_port);
           if (_service) {
             CFNetServiceClientContext context = {0, (ARC_BRIDGE void*)self, NULL, NULL, NULL};
             CFNetServiceSetClient(_service, _NetServiceClientCallBack, &context);

+ 2 - 2
CGDWebServer/GCDWebServerRequest.m

@@ -429,7 +429,7 @@ static NSStringEncoding _StringEncodingFromCharset(NSString* charset) {
           const void* dataBytes = _parserData.bytes;
           NSUInteger dataLength = range.location - 2;
           if (_tmpPath) {
-            int result = write(_tmpFile, dataBytes, dataLength);
+            ssize_t result = write(_tmpFile, dataBytes, dataLength);
             if (result == dataLength) {
               if (close(_tmpFile) == 0) {
                 _tmpFile = 0;
@@ -467,7 +467,7 @@ static NSStringEncoding _StringEncodingFromCharset(NSString* charset) {
       NSUInteger margin = 2 * _boundary.length;
       if (_tmpPath && (_parserData.length > margin)) {
         NSUInteger length = _parserData.length - margin;
-        int result = write(_tmpFile, _parserData.bytes, length);
+        ssize_t result = write(_tmpFile, _parserData.bytes, length);
         if (result == length) {
           [_parserData replaceBytesInRange:NSMakeRange(0, length) withBytes:NULL length:0];
         } else {

+ 4 - 0
GCDWebServer.xcodeproj/project.pbxproj

@@ -291,6 +291,7 @@
 		1DEB928608733DD80010E9CD /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD)";
 				MACOSX_DEPLOYMENT_TARGET = 10.7;
 				PRODUCT_NAME = GCDWebServer;
 				SDKROOT = macosx;
@@ -300,6 +301,7 @@
 		1DEB928708733DD80010E9CD /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD)";
 				MACOSX_DEPLOYMENT_TARGET = 10.7;
 				PRODUCT_NAME = GCDWebServer;
 				SDKROOT = macosx;
@@ -328,6 +330,7 @@
 		E22112761690B4DF0048D2B2 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				INFOPLIST_FILE = iOS/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 5.0;
@@ -341,6 +344,7 @@
 		E22112771690B4DF0048D2B2 /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
 				CODE_SIGN_IDENTITY = "iPhone Developer";
 				INFOPLIST_FILE = iOS/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 5.0;