swarm-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [swarm-hackers] Swarm on MacOS 10.6 Snow Leopard


From: Nima Talebi
Subject: Re: [swarm-hackers] Swarm on MacOS 10.6 Snow Leopard
Date: Sat, 7 Nov 2009 12:15:21 +1100

Err - I'm a fool - that causes much more problems than it solves for already-obvious reasons. Please disregard this :)

Nima

On Sat, Nov 7, 2009 at 12:12 PM, Nima Talebi <address@hidden> wrote:
Adding -ansi can fix that, but is that what everyone else is doing?  And just out of interest, why do we have both K&R and non-K&R-style function prototyping?  Just evolved that way or there's a higher reason?

Nima


On Sat, Nov 7, 2009 at 12:06 PM, Nima Talebi <address@hidden> wrote:
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




--
Nima Talebi
web: http://ai.autonomy.net.au/People/Nima
gpg: B51D 1F18 D8E2 B702 B027 23A4 E06B DAC1 BE70 ADC0



--
Nima Talebi
web: http://ai.autonomy.net.au/People/Nima
gpg: B51D 1F18 D8E2 B702 B027 23A4 E06B DAC1 BE70 ADC0

reply via email to

[Prev in Thread] Current Thread [Next in Thread]