Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hp4nl!orcenl!hbergh From: hbergh@oracle.nl (Herbert van den Bergh) Newsgroups: comp.mail.elm Subject: Re: Anyone get ELM to compile on RS/6000 ?? Message-ID: <1116@nlsun1.oracle.nl> Date: 13 Nov 90 10:27:50 GMT References: <883@ki.UUCP> Reply-To: hbergh@oracle.nl (Herbert van den Bergh) Organization: Oracle Europe, The Netherlands Lines: 28 In article <883@ki.UUCP> dwatts@ki.UUCP (Dan Watts) writes: >Has anyone been successful in getting ELM to compile on the IBM RS/6000? Yes. > cc -I../hdrs -c addr_util.c > 49 | char *strtok(), *strcpy(), *strcat(), *strncpy(), *index(), > *rindex(); > 1506-041: (S) Parameter list cannot contain fewer parameters than required by macro definition. > >The problem appears to be that CC doesn't like the redeclaration of >'char *strok()' and all the rest. If you put in lines of code like: Not exactly. It's strcpy() that causes the problems. When you compile with -O, the compiler will try to inline strcpy() and strcmp(). To do this, it defines two macros strcpy() and and strcmp(), which conflict with the function declarations in the elm sources. >Is there some compiler switch that will make the compiler accept this? Yes. With the current version of the compiler, you don't want to use inlined strcpy()/strcmp() anyway, so you can disable this mechanism by adding the compiler option -U__STR__ to your makefiles. No editing of source files required. -- Herbert van den Bergh, Email: hbergh@oracle.nl, hbergh@oracle.com ORACLE Europe