|
From: | Nima Talebi |
Subject: | Re: [swarm-hackers] Swarm on MacOS 10.6 Snow Leopard |
Date: | Sat, 7 Nov 2009 12:12:22 +1100 |
Okay, now have compilation down to 25 errors...My first question is regarding the K&R style code, for example.../* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */
char *
stpcpy (dest, src)
char *dest;
const char *src;
{
register char *d = dest;
register const char *s = src;
do
*d++ = *s;
while (*s++ != '\0');
return d - 1;
}
...from swarm/src/misc/stpcpy.c
Why do we have K&R style code to begin with, and how do I configure Xcode to be K&R-compatible?
CompileC build/Swarm.build/Debug/Swarm.build/Objects-normal/i386/stpcpy.o ../../src/misc/stpcpy.c normal i386 c com.apple.compilers.gcc.4_2
cd /srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX
setenv LANG en_US.US-ASCII
/Developer/usr/bin/gcc-4.2 -x c -arch i386 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -DSWARM_OSX=1 -isysroot /Developer/SDKs/MacOSX10.6.sdk -mfix-and-continue -mmacosx-version-min=10.6 -gdwarf-2 -I/srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/build/Swarm.build/Debug/Swarm.build/Swarm.hmap -F/srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/build/Debug -I/srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/build/Debug/include -I../../avcall -I/usr/local/include -I../.. -I../../src -I/Developer/SDKs/MacOSX10.6.sdk/usr/include/ffi -I/srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/build/Swarm.build/Debug/Swarm.build/DerivedSources/i386 -I/srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/build/Swarm.build/Debug/Swarm.build/DerivedSources -fnested-functions -include /var/folders/La/LanU3X4iH0ax+b7biBINWk+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/Swarm_Prefix-ecdgfbmbfjbnkafrlozulvwbisco/Swarm_Prefix.pch -c /srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/../../src/misc/stpcpy.c -o /srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/build/Swarm.build/Debug/Swarm.build/Objects-normal/i386/stpcpy.o
/srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/../../src/misc/stpcpy.c:26: error: expected ')' before numeric constant
/srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/../../src/misc/stpcpy.c:26: error: expected ')' before '!=' token
/srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/../../src/misc/stpcpy.c:26: error: expected ')' before '?' token
/srv/src/swarm/swarm-trunk/swarm/macosx/SwarmOSX/../../src/misc/stpcpy.c:29: error: expected identifier or '(' before '{' token
Nima
[Prev in Thread] | Current Thread | [Next in Thread] |