Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 91007c9

Browse files
author
Tim Burks
committed
Debian Linux port, added gc support for Darwin.
1 parent af23680 commit 91007c9

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

‎Nukefile‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
(set SYSTEM ((NSString stringWithShellCommand:"uname") chomp))
66
(case SYSTEM
77
("Darwin"
8-
(set @cflags "-g -std=gnu99 -DDARWIN -I/usr/local/pgsql/include")
8+
(set @cflags "-g -fobjc-gc -std=gnu99 -DDARWIN -I/usr/local/pgsql/include")
99
(set @ldflags "-framework Foundation -framework Nu -lpq -L/usr/local/pgsql/lib"))
1010
("Linux"
1111
(set @arch (list "i386"))
12-
(set @cflags "-g -DLINUX -I/usr/local/pgsql/include -fconstant-string-class=NSConstantString ")
13-
(set @ldflags "-L/usr/local/lib -lNuFound -lNu -lpq -L/usr/local/pgsql/lib"))
12+
(set @cflags "-g -std=gnu99 -DLINUX -I/usr/include/GNUstep/Headers -I/usr/local/include -I/usr/local/pgsql/include -fconstant-string-class=NSConstantString ")
13+
(set @ldflags "-L/usr/local/lib -lNu -lpq -L/usr/local/pgsql/lib"))
1414
(else nil))
1515

1616
;; framework description
@@ -30,7 +30,7 @@
3030

3131
(task "install" => "framework" is
3232
(SH "sudo rm -rf /Library/Frameworks/#{@framework}.framework")
33-
(SH "ditto #{@framework}.framework /Library/Frameworks/#{@framework}.framework"))
33+
(SH "sudo cp -rp #{@framework}.framework /Library/Frameworks/#{@framework}.framework"))
3434

3535
(task "test" => "framework" is
3636
(SH "nutest test/test_*.nu"))

‎nu/postgresql.nu‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
;; See the License for the specific language governing permissions and
1616
;; limitations under the License.
1717

18-
(class PGFieldType (ivar-accessors))
18+
(class PGFieldType (ivar-accessors)
19+
(- (id) name is @name)) ;; required to avoid GNUstep conflict
1920

2021
(class PGResult (ivar-accessors)
2122
(- (id) array is

‎objc/postgres.m‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ - (NSString *) connectionString
218218
@"krbsrvname", @"service", nil];
219219

220220
NSMutableString *connectionString = [NSMutableString string];
221-
for (id key in [connectionInfo allKeys]) {
221+
NSArray *keys = [connectionInfo allKeys];
222+
int count = [keys count];
223+
for (int i = 0; i < count; i++) {
224+
id key = [keys objectAtIndex:i];
222225
id value;
223226
if ((value = [connectionInfo objectForKey:key])) {
224227
[connectionString appendFormat:@" %@='%@'", key, value];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /