Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Commit

Permalink
updates to project to make it compile for Mac as well as iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
djthorpe committed Jan 3, 2015
1 parent 1633c90 commit 5b30cc6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 24 deletions.
31 changes: 12 additions & 19 deletions postgresql-kit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1764,8 +1764,8 @@
14280457166811D700A61BF6 /* openssl_mac */,
6E256FEE15F255780079AD2D /* postgresql_mac */,
6ED85B3516288C4800A6DC02 /* PGClientKit_mac */,
1433614A179173BB000A79D5 /* PGSchemaKit_mac */,
6ED763FA15F2673600687079 /* PGServerKit_mac */,
1433614A179173BB000A79D5 /* PGSchemaKit_mac */,
14F1E84617CB83CD00710D4A /* PGControlsKit_mac */,
1418234D166128C000765768 /* PGDataKit_mac */,
6E83260A17AD15C9002AFCBC /* openssl_ios */,
Expand Down Expand Up @@ -3056,8 +3056,6 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
Expand All @@ -3076,12 +3074,15 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"${BUILT_PRODUCTS_DIR}/postgresql-current-mac_x86_64/include",
);
INFOPLIST_FILE = src/Frameworks/PGServerKit/PGServerKit.plist;
INSTALL_PATH = "@executable_path/../Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.01;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = PGServerKit;
SKIP_INSTALL = NO;
WRAPPER_EXTENSION = framework;
};
name = Debug;
Expand All @@ -3093,9 +3094,6 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
Expand All @@ -3107,12 +3105,15 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"${BUILT_PRODUCTS_DIR}/postgresql-current-mac_x86_64/include",
);
INFOPLIST_FILE = src/Frameworks/PGServerKit/PGServerKit.plist;
INSTALL_PATH = "@executable_path/../Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.01;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PRODUCT_NAME = PGServerKit;
SKIP_INSTALL = NO;
WRAPPER_EXTENSION = framework;
};
name = Release;
Expand All @@ -3124,8 +3125,6 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
Expand All @@ -3152,10 +3151,8 @@
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/Frameworks/LDAP.framework/Versions/A\"",
);
MACOSX_DEPLOYMENT_TARGET = 10.8;
PRELINK_LIBS = "${BUILT_PRODUCTS_DIR}/postgresql-current-mac_x86_64/lib/libpq.a ${BUILT_PRODUCTS_DIR}/openssl-current-mac_x86_64/lib/libcrypto.a ${BUILT_PRODUCTS_DIR}/openssl-current-mac_x86_64/lib/libssl.a";
PRODUCT_NAME = PGClientKit;
SKIP_INSTALL = NO;
WRAPPER_EXTENSION = framework;
};
name = Debug;
Expand All @@ -3167,9 +3164,6 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
Expand All @@ -3189,10 +3183,8 @@
"$(inherited)",
"\"$(SYSTEM_LIBRARY_DIR)/Frameworks/LDAP.framework/Versions/A\"",
);
MACOSX_DEPLOYMENT_TARGET = 10.8;
PRELINK_LIBS = "${BUILT_PRODUCTS_DIR}/postgresql-current-mac_x86_64/lib/libpq.a ${BUILT_PRODUCTS_DIR}/openssl-current-mac_x86_64/lib/libcrypto.a ${BUILT_PRODUCTS_DIR}/openssl-current-mac_x86_64/lib/libssl.a";
PRODUCT_NAME = PGClientKit;
SKIP_INSTALL = NO;
WRAPPER_EXTENSION = framework;
};
name = Release;
Expand Down Expand Up @@ -3340,6 +3332,7 @@
6E15483E1A5816E600556573 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6E256FE115F252620079AD2D /* Build configuration list for PBXProject "postgresql-kit" */ = {
isa = XCConfigurationList;
Expand Down
2 changes: 1 addition & 1 deletion src/Frameworks/PGClientKit/NSURL+PGAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ +(NSString* )_pg_urlencode_port:(NSUInteger)port {
if(port==0) {
return @"";
} else {
return [NSString stringWithFormat:@":%ld",port];
return [NSString stringWithFormat:@":%ld",(unsigned long)port];
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/Frameworks/PGClientKit/PGConverters+Data2Object.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void _pgdata2obj_cache_init() {
i++;
} while(t->name);
#ifdef DEBUG
NSLog(@"pgdata2obj_cache_init: allocating %lu entries, %lu bytes for cache",(_pgdata2obj_cache_max+1),sizeof(PGResultConverterType) * (_pgdata2obj_cache_max+1));
NSLog(@"pgdata2obj_cache_init: allocating %lu entries, %lu bytes for cache",(unsigned long)(_pgdata2obj_cache_max+1),sizeof(PGResultConverterType) * (_pgdata2obj_cache_max+1));
#endif
_pgdata2obj_cache = malloc((_pgdata2obj_cache_max+1) * sizeof(PGResultConverterType));
assert(_pgdata2obj_cache);
Expand Down Expand Up @@ -110,14 +110,14 @@ void pgdata2obj_destroy() {
// return default if not found in cache
if(oid > _pgdata2obj_cache_max) {
#ifdef DEBUG
NSLog(@"No type convertors for oid=%lu, using default",oid);
NSLog(@"No type convertors for oid=%lu, using default",(unsigned long)oid);
#endif
return _pgdata2obj_cache;
}
PGResultConverterType* t = _pgdata2obj_cache + oid;
if(t->oid==0) {
#ifdef DEBUG
NSLog(@"No type convertors (2) for oid=%lu, using default",oid);
NSLog(@"No type convertors (2) for oid=%lu, using default",(unsigned long)oid);
#endif
return _pgdata2obj_cache;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Frameworks/PGClientKit/PGPasswordStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ -(NSString* )_accountForURL:(NSURL* )url {
NSString* value = [parameters objectForKey:key];
// special case for port
if([key isEqualToString:@"port"] && value==nil) {
value = [NSString stringWithFormat:@"%lu",PGClientDefaultPort];
value = [NSString stringWithFormat:@"%lu",(unsigned long)PGClientDefaultPort];
}
if(value) {
[parts addObject:[NSString stringWithFormat:@"%@=%@",key,[[value description] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]];
Expand Down

0 comments on commit 5b30cc6

Please sign in to comment.