Index: Makefile =================================================================== RCS file: /cvsroot/tiger/tiger/c/Makefile,v retrieving revision 1.3 diff -u -r1.3 Makefile --- Makefile 19 Oct 2003 10:01:21 -0000 1.3 +++ Makefile 24 Aug 2005 14:08:26 -0000 @@ -1,3 +1,4 @@ +# Generated automatically from Makefile.in by configure. # Makefile for tiger binaries # # @@ -21,12 +22,14 @@ # and they could not be compiled at first (they have # been added later) BINLIST=getpermit snefru md5 testsuid realpath -COPTS= -DNEEDGETWD +COPTS=-Wall +INSTALL=/usr/bin/install -c +CC=gcc all: ${BINLIST} install: all - cp ${BINLIST} ../bin/ + $(INSTALL) -m0755 ${BINLIST} ../bin/ % : %.c Index: Makefile.in =================================================================== RCS file: /cvsroot/tiger/tiger/c/Makefile.in,v retrieving revision 1.1 diff -u -r1.1 Makefile.in --- Makefile.in 31 Mar 2005 18:00:53 -0000 1.1 +++ Makefile.in 24 Aug 2005 14:08:26 -0000 @@ -21,7 +21,7 @@ # and they could not be compiled at first (they have # been added later) BINLIST=getpermit snefru md5 testsuid realpath -COPTS= -DNEEDGETWD +COPTS=-Wall address@hidden@ address@hidden@ Index: realpath.c =================================================================== RCS file: /cvsroot/tiger/tiger/c/realpath.c,v retrieving revision 1.4 diff -u -r1.4 realpath.c --- realpath.c 28 Jul 2005 15:00:13 -0000 1.4 +++ realpath.c 24 Aug 2005 14:08:26 -0000 @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -56,8 +57,11 @@ #endif #ifdef __STDC__ +#ifndef _UNISTD_H extern char *getwd(char * const); +extern char *getcwd(char * const, const size_t); extern int readlink(char * const, char * const, const size_t); +#endif extern char *my_realpath(const char *, char [], int); extern char *_realpath(char [], int); #else @@ -110,7 +114,11 @@ int linkcount = 0; if(path[0] != '/'){ +#if defined __STDC__ + getcwd(buffer, sizeof(buffer)); +#else getwd(buffer); +#endif prevslash = buffer+strlen(buffer); strcpy(prevslash,"/"); strcpy(prevslash+1,path);