From: Kaveh R. Ghazi Date: Tue, 31 Aug 1999 01:01:15 +0000 (+0000) Subject: Makefile.in (OBJS, PROTO_OBJS): Remove getpwd.o. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a2957e1d3ededa4abbfc4bca373d23dd810b6783;p=gcc.git Makefile.in (OBJS, PROTO_OBJS): Remove getpwd.o. * Makefile.in (OBJS, PROTO_OBJS): Remove getpwd.o. (getpwd.o): Remove target. * getpwd.c: Delete file. Its in libiberty now. * dbxout.c (getpwd): Don't prototype. * dwarf2out.c (getpwd): Likewise * dwarfout.c (getpwd): Likewise * final.c (getpwd): Likewise. * protoize.c (getpwd): Likewise. From-SVN: r28999 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 024e4e67b3b..230e0f1dda5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,16 @@ +Mon Aug 30 20:56:08 1999 Kaveh R. Ghazi + + * Makefile.in (OBJS, PROTO_OBJS): Remove getpwd.o. + (getpwd.o): Remove target. + + * getpwd.c: Delete file. Its in libiberty now. + + * dbxout.c (getpwd): Don't prototype. + * dwarf2out.c (getpwd): Likewise + * dwarfout.c (getpwd): Likewise + * final.c (getpwd): Likewise. + * protoize.c (getpwd): Likewise. + Mon Aug 30 20:21:34 1999 Kaveh R. Ghazi * cse.c: (fold_rtx): Cast to HOST_WIDE_INT in left shift. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 7b6f100ef14..92b285371c2 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -667,7 +667,7 @@ OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o fold-const.o \ regclass.o regmove.o local-alloc.o global.o reload.o reload1.o caller-save.o \ insn-peep.o reorg.o haifa-sched.o final.o recog.o reg-stack.o \ insn-opinit.o insn-recog.o insn-extract.o insn-output.o insn-emit.o lcm.o \ - profile.o insn-attrtab.o $(out_object_file) getpwd.o $(EXTRA_OBJS) convert.o \ + profile.o insn-attrtab.o $(out_object_file) $(EXTRA_OBJS) convert.o \ mbchar.o dyn-string.o splay-tree.o graph.o sbitmap.o resource.o hash.o lists.o # GEN files are listed separately, so they can be built before doing parallel @@ -1504,7 +1504,6 @@ emit-rtl.o : emit-rtl.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ function.h $(REGS_H) insn-config.h $(RECOG_H) real.h \ $(EXPR_H) $(srcdir)/../include/obstack.h hard-reg-set.h bitmap.h toplev.h real.o : real.c $(CONFIG_H) system.h $(TREE_H) toplev.h -getpwd.o : getpwd.c $(CONFIG_H) system.h integrate.o : integrate.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \ integrate.h insn-flags.h insn-config.h $(EXPR_H) real.h $(REGS_H) \ @@ -2007,7 +2006,7 @@ cppinit.o: cppinit.c $(CONFIG_H) cpplib.h intl.h system.h \ proto: config.status protoize$(exeext) unprotoize$(exeext) SYSCALLS.c.X -PROTO_OBJS = getpwd.o intl.o version.o +PROTO_OBJS = intl.o version.o protoize$(exeext): protoize.o $(PROTO_OBJS) $(LIBDEPS) $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ protoize.o $(PROTO_OBJS) $(LIBS) diff --git a/gcc/dbxout.c b/gcc/dbxout.c index bc15a4d5411..85368182b14 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -136,8 +136,6 @@ Boston, MA 02111-1307, USA. */ #endif #endif -char *getpwd (); - /* Typical USG systems don't have stab.h, and they also have no use for DBX-format debugging info. */ diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index f656d275b5f..29410024867 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -2022,8 +2022,6 @@ dwarf2out_frame_finish () /* And now, the support for symbolic debugging information. */ #ifdef DWARF2_DEBUGGING_INFO -extern char *getpwd PROTO((void)); - /* NOTE: In the comments in this file, many references are made to "Debugging Information Entries". This term is abbreviated as `DIE' throughout the remainder of this file. */ diff --git a/gcc/dwarfout.c b/gcc/dwarfout.c index 8e0d018da49..4f6c3ea93aa 100644 --- a/gcc/dwarfout.c +++ b/gcc/dwarfout.c @@ -50,8 +50,6 @@ extern time_t time PROTO ((time_t *)); /* FIXME: use NEED_DECLARATION_TIME */ # define assert(e) do { if (! (e)) abort (); } while (0) #endif -extern char *getpwd PROTO((void)); - /* IMPORTANT NOTE: Please see the file README.DWARF for important details regarding the GNU implementation of Dwarf. */ diff --git a/gcc/final.c b/gcc/final.c index 9d725adc98c..58361ab69ff 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -307,8 +307,6 @@ static void leaf_renumber_regs PROTO((rtx)); #ifdef HAVE_cc0 static int alter_cond PROTO((rtx)); #endif - -extern char *getpwd (); /* Initialize data in final at the beginning of a compilation. */ diff --git a/gcc/getpwd.c b/gcc/getpwd.c deleted file mode 100644 index c3d155e5741..00000000000 --- a/gcc/getpwd.c +++ /dev/null @@ -1,90 +0,0 @@ -/* getpwd.c - get the working directory */ - -#include "config.h" -#include "system.h" - -/* Virtually every UN*X system now in common use (except for pre-4.3-tahoe - BSD systems) now provides getcwd as called for by POSIX. Allow for - the few exceptions to the general rule here. */ - -#if !(defined (POSIX) || defined (USG) || defined (VMS)) || defined (HAVE_GETWD) -#define getcwd(buf,len) getwd(buf) -#ifdef MAXPATHLEN -#define GUESSPATHLEN (MAXPATHLEN + 1) -#else -#define GUESSPATHLEN 100 -#endif -#else /* (defined (USG) || defined (VMS)) */ -/* We actually use this as a starting point, not a limit. */ -#define GUESSPATHLEN 100 -#endif /* (defined (USG) || defined (VMS)) */ - -#if !(defined (VMS) || (defined(_WIN32) && !defined(__CYGWIN__))) - -/* Get the working directory. Use the PWD environment variable if it's - set correctly, since this is faster and gives more uniform answers - to the user. Yield the working directory if successful; otherwise, - yield 0 and set errno. */ - -char * -getpwd () -{ - static char *pwd; - static int failure_errno; - - char *p = pwd; - size_t s; - struct stat dotstat, pwdstat; - - if (!p && !(errno = failure_errno)) - { - if (! ((p = getenv ("PWD")) != 0 - && *p == '/' - && stat (p, &pwdstat) == 0 - && stat (".", &dotstat) == 0 - && dotstat.st_ino == pwdstat.st_ino - && dotstat.st_dev == pwdstat.st_dev)) - - /* The shortcut didn't work. Try the slow, ``sure'' way. */ - for (s = GUESSPATHLEN; ! getcwd (p = xmalloc (s), s); s *= 2) - { - int e = errno; - free (p); -#ifdef ERANGE - if (e != ERANGE) -#endif - { - errno = failure_errno = e; - p = 0; - break; - } - } - - /* Cache the result. This assumes that the program does - not invoke chdir between calls to getpwd. */ - pwd = p; - } - return p; -} - -#else /* VMS || _WIN32 && !__CYGWIN__ */ - -#ifndef MAXPATHLEN -#define MAXPATHLEN 255 -#endif - -char * -getpwd () -{ - static char *pwd = 0; - - if (!pwd) - pwd = getcwd (xmalloc (MAXPATHLEN + 1), MAXPATHLEN + 1 -#ifdef VMS - , 0 -#endif - ); - return pwd; -} - -#endif /* VMS || _WIN32 && !__CYGWIN__ */ diff --git a/gcc/protoize.c b/gcc/protoize.c index 73a573ad5d4..968b17dfafa 100644 --- a/gcc/protoize.c +++ b/gcc/protoize.c @@ -109,8 +109,6 @@ extern char *version_string; #define my_open(file, mode, flag) open((char *)file, mode, flag) #define my_chmod(file, mode) chmod((char *)file, mode) -extern char *getpwd (); - static void usage PARAMS ((void)) ATTRIBUTE_NORETURN; static void aux_info_corrupted PARAMS ((void)) ATTRIBUTE_NORETURN; static void declare_source_confusing PARAMS ((const char *)) ATTRIBUTE_NORETURN;