diff options
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/utils/ChangeLog | 9 | ||||
-rw-r--r-- | winsup/utils/Makefile.in | 53 | ||||
-rw-r--r-- | winsup/utils/cygcheck.cc | 46 | ||||
-rw-r--r-- | winsup/utils/dumper.cc | 4 | ||||
-rw-r--r-- | winsup/utils/parse_pe.cc | 2 | ||||
-rw-r--r-- | winsup/utils/setfacl.c | 2 |
6 files changed, 63 insertions, 53 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 8896bcb88..450705af0 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,12 @@ +Sat Oct 28 01:37:55 2000 Christopher Faylor <cgf@cygnus.com> + + * Makefile.in: Accomodate newer gcc's which require linking of c++ + programs with g++. Fixup output for some compilations. + * cygcheck.cc: Respond to compiler warnings. + * dumper.cc (main): Ditto. + * parse_pe.cc (exclusion::sort_and_check): Ditto. + * setfacl.cc (getaclentry): Ditto. + Fri Oct 27 20:20:29 2000 Christopher Faylor <cgf@cygnus.com> * strace.cc (main): Add a '-b' option. diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index 8526069bd..2d0bfd018 100644 --- a/winsup/utils/Makefile.in +++ b/winsup/utils/Makefile.in @@ -27,6 +27,8 @@ EXEEXT_FOR_BUILD:=@EXEEXT_FOR_BUILD@ CC:=@CC@ CC_FOR_TARGET:=$(CC) +CXX:=${subst gcc,g++,$(CC)} +CXX_FOR_TARGET:=$(CXX) CFLAGS:=@CFLAGS@ CXXFLAGS:=@CXXFLAGS@ -fno-exceptions -nostdinc++ -fno-rtti @@ -42,9 +44,7 @@ build_dumper:=${shell test -r $(libbfd) -a -r $(libintl) -a -d $(updir1)/include DUMPER_INCLUDES:=-I$(bupdir2)/bfd -I$(updir1)/include MINGW_CXXFLAGS:=$(CXXFLAGS) -mno-cygwin $(MINGW_INCLUDES) -MINGW_CFLAGS:=$(CFLAGS) -mno-cygwin $(MINGW_INCLUDES) - -DUMPER_CFLAGS:=$(CFLAGS) $(INCLUDES) $(DUMPER_INCLUDES) +MINGW_CFLAGS:=-mno-cygwin $(MINGW_INCLUDES) libcygwin:=$(cygwin_build)/libcygwin.a libuser32:=$(w32api_lib)/libuser32.a @@ -89,23 +89,44 @@ all: Makefile $(PROGS) strace.exe: strace.cc mingw_getopt.o $(MINGW_DEP_LDLIBS) ifdef VERBOSE - $(CC) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS) + $(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS) else - @echo $(CC) -o $@ ${wordlist 1,2,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\ - $(CC) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS) + @echo $(CXX) -o $@ ${wordlist 1,2,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\ + $(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS) endif dumper.o: dumper.cc dumper.h - $(CC) -c -o $@ $(DUMPER_CFLAGS) ${firstword $^} +ifdef VERBOSE + $(COMPILE_CC) $c -o $@ $(DUMPER_INCLUDES) ${firstword $^} +else + @echo $(CC) $c $(CFLAGS) $(DUMPER_INCLUDES) ... $(basename $@).cc;\ + $(COMPILE_CC) $c -o $(@D)/$(basename $@)$o $(DUMPER_INCLUDES) $< +endif + module_info.o: module_info.cc - $(CC) -c -o $@ $(DUMPER_CFLAGS) $^ +ifdef VERBOSE + $(COMPILE_CC) $c -o $@ $(DUMPER_INCLUDES) ${firstword $^} +else + @echo $(CC) $c $(CFLAGS) $(DUMPER_INCLUDES) ... $(basename $@).cc;\ + $(COMPILE_CC) $c -o $(@D)/$(basename $@)$o $(DUMPER_INCLUDES) $< +endif parse_pe.o: parse_pe.cc dumper.h - $(CC) -c -o $@ $(DUMPER_CFLAGS) ${firstword $^} +ifdef VERBOSE + $(COMPILE_CC) $c -o $@ $(DUMPER_INCLUDES) ${firstword $^} +else + @echo $(CC) $c $(CFLAGS) $(DUMPER_INCLUDES) ... $(basename $@).cc;\ + $(COMPILE_CC) $c -o $(@D)/$(basename $@)$o $(DUMPER_INCLUDES) $< +endif mingw_getopt.o: $(cygwin_source)/lib/getopt.c - $(CC) -c -o $@ $(MINGW_CFLAGS) $^ +ifdef VERBOSE + $(COMPILE_CC) $c -o $(@D)/$(basename $@)$o $(MINGW_CFLAGS) $< +else + @echo $(CC) $c -o $(@D)/$(basename $@)$o $(MINGW_CFLAGS) ... $^;\ + $(COMPILE_CC) $c -o $(@D)/$(basename $@)$o $(MINGW_CFLAGS) $< +endif clean: rm -f *.o $(CLEAN_PROGS) @@ -135,16 +156,16 @@ warn_dumper: dumper.exe: module_info.o parse_pe.o dumper.o $(ALL_DEP_LDLIBS) ifdef VERBOSE - $(CC) -o $@ ${wordlist 1,3,$^} -B$(cygwin_build)/ $(DUMPER_LDFLAGS) + $(CXX) -o $@ ${wordlist 1,3,$^} -B$(cygwin_build)/ $(DUMPER_LDFLAGS) else - @echo $(CC) -o $@ ${wordlist 1,3,$^} ${filter-out -B%, $(DUMPER_LDFLAGS)};\ - $(CC) -o $@ ${wordlist 1,3,$^} -B$(cygwin_build)/ $(DUMPER_LDFLAGS) + @echo $(CXX) -o $@ ${wordlist 1,3,$^} ${filter-out -B%, $(DUMPER_LDFLAGS)};\ + $(CXX) -o $@ ${wordlist 1,3,$^} -B$(cygwin_build)/ $(DUMPER_LDFLAGS) endif %.exe: %.o $(ALL_DEP_LDLIBS) ifdef VERBOSE - $(CC) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS) + $(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS) else - @echo $(CC) -o $@ ${firstword $^} ${filter-out -B%, $(ALL_LDFLAGS)};\ - $(CC) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS) + @echo $(CXX) -o $@ ${firstword $^} ${filter-out -B%, $(ALL_LDFLAGS)};\ + $(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS) endif diff --git a/winsup/utils/cygcheck.cc b/winsup/utils/cygcheck.cc index 94734c98e..dfca35b0f 100644 --- a/winsup/utils/cygcheck.cc +++ b/winsup/utils/cygcheck.cc @@ -61,38 +61,17 @@ struct } common_apps[] = { - { - "bash", 0} - , - { - "cat", 0} - , - { - "cpp", 1} - , - { - "find", 0} - , - { - "gcc", 0} - , - { - "gdb", 0} - , - { - "ld", 0} - , - { - "ls", 0} - , - { - "make", 0} - , - { - "sh", 0} - , - { - 0, 0} + {"bash", 0}, + {"cat", 0}, + {"cpp", 1}, + {"find", 0}, + {"gcc", 0}, + {"gdb", 0}, + {"ld", 0}, + {"ls", 0}, + {"make", 0}, + {"sh", 0}, + {0, 0} }; int num_paths = 0, max_paths = 0; @@ -1038,7 +1017,8 @@ struct option longopts[] = { {"help", no_argument, NULL, 'h'}, {0, no_argument, NULL, 0} }; -char *opts = "srvkh"; + +char opts[] = "srvkh"; int main (int argc, char **argv) diff --git a/winsup/utils/dumper.cc b/winsup/utils/dumper.cc index df3f14640..db4e16deb 100644 --- a/winsup/utils/dumper.cc +++ b/winsup/utils/dumper.cc @@ -79,7 +79,7 @@ dumper::dumper (DWORD pid, DWORD tid, const char *file_name) dumper_abort (); } -dumper: :~dumper () +dumper::~dumper () { close (); free (file_name); @@ -740,7 +740,7 @@ int main (int argc, char **argv) { int opt; - char *p = ""; + const char *p = ""; DWORD pid; while ((opt = getopt (argc, argv, "dc:")) != EOF) diff --git a/winsup/utils/parse_pe.cc b/winsup/utils/parse_pe.cc index b43957279..7e2a83731 100644 --- a/winsup/utils/parse_pe.cc +++ b/winsup/utils/parse_pe.cc @@ -49,7 +49,7 @@ exclusion::sort_and_check () process_mem_region *q = p + 1; if (p->base + size > q->base) { - fprintf (stderr, "region error @ %08x", p->base); + fprintf (stderr, "region error @ %08x", (unsigned) p->base); return 0; } } diff --git a/winsup/utils/setfacl.c b/winsup/utils/setfacl.c index 87c96aeac..c63b5d1af 100644 --- a/winsup/utils/setfacl.c +++ b/winsup/utils/setfacl.c @@ -112,7 +112,7 @@ getaclentry (action_t action, char *c, aclent_t *ace) return FALSE; if (ace->a_type & (USER_OBJ | GROUP_OBJ)) { - if (c2 = strchr (c, ':')) + if ((c2 = strchr (c, ':'))) { if (action == Delete) return FALSE; |