* Makefile.in: Build intermediate cygcheck.o to force use of MINGW_CXXFLAGS.
* cygcheck.cc (cygwin_info): Intitialize variable to quiet g++ warning. (dump_sysinfo): Make variables unsigned to quiet g++ warnings. * strace.cc (version_string): Rename from SCCSid. (add_child): Remove unused variable. (version): Use version_string. Avoid use of fprintf.
This commit is contained in:
parent
f3647dd7e6
commit
ad466e2f75
@ -1,3 +1,12 @@
|
|||||||
|
2002-01-21 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* Makefile.in: Build intermediate cygcheck.o to force use of MINGW_CXXFLAGS.
|
||||||
|
* cygcheck.cc (cygwin_info): Intitialize variable to quiet g++ warning.
|
||||||
|
(dump_sysinfo): Make variables unsigned to quiet g++ warnings.
|
||||||
|
* strace.cc (version_string): Rename from SCCSid.
|
||||||
|
(add_child): Remove unused variable.
|
||||||
|
(version): Use version_string. Avoid use of fprintf.
|
||||||
|
|
||||||
2002-01-21 DJ Delorie <dj@redhat.com>
|
2002-01-21 DJ Delorie <dj@redhat.com>
|
||||||
|
|
||||||
* Makefile.in: Use CXX instead of CC to compile C++ sources.
|
* Makefile.in: Use CXX instead of CC to compile C++ sources.
|
||||||
|
@ -86,7 +86,7 @@ endif
|
|||||||
|
|
||||||
all: Makefile $(PROGS)
|
all: Makefile $(PROGS)
|
||||||
|
|
||||||
strace.exe: strace.cc mingw_getopt.o $(MINGW_DEP_LDLIBS)
|
strace.exe: strace.o mingw_getopt.o $(MINGW_DEP_LDLIBS)
|
||||||
ifdef VERBOSE
|
ifdef VERBOSE
|
||||||
$(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
|
$(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
|
||||||
else
|
else
|
||||||
@ -94,7 +94,7 @@ else
|
|||||||
$(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
|
$(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cygcheck.exe: cygcheck.cc mingw_getopt.o path.o dump_setup.o $(MINGW_DEP_LDLIBS)
|
cygcheck.exe: cygcheck.o mingw_getopt.o path.o dump_setup.o $(MINGW_DEP_LDLIBS)
|
||||||
ifdef VERBOSE
|
ifdef VERBOSE
|
||||||
$(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,4,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
|
$(CXX) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,4,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
|
||||||
else
|
else
|
||||||
@ -151,6 +151,22 @@ else
|
|||||||
${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $<
|
${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $<
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
cygcheck.o: cygcheck.cc
|
||||||
|
ifdef VERBOSE
|
||||||
|
${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $<
|
||||||
|
else
|
||||||
|
@echo $(CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) ... $^;\
|
||||||
|
${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $<
|
||||||
|
endif
|
||||||
|
|
||||||
|
strace.o: strace.cc
|
||||||
|
ifdef VERBOSE
|
||||||
|
${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $<
|
||||||
|
else
|
||||||
|
@echo $(CXX) $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) ... $^;\
|
||||||
|
${filter-out -I$(newlib_source)/%,$(COMPILE_CXX)} $c -o $(@D)/$(basename $@)$o $(MINGW_CXXFLAGS) $<
|
||||||
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o $(CLEAN_PROGS)
|
rm -f *.o $(CLEAN_PROGS)
|
||||||
|
|
||||||
|
@ -352,7 +352,8 @@ cygwin_info (HANDLE h)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *dll_major;
|
static char dummy[] = "\0\0\0\0\0\0\0";
|
||||||
|
char *dll_major = dummy;
|
||||||
bufend = buf + size;
|
bufend = buf + size;
|
||||||
while (buf < bufend)
|
while (buf < bufend)
|
||||||
if ((buf = (char *) memchr (buf, '%', bufend - buf)) == NULL)
|
if ((buf = (char *) memchr (buf, '%', bufend - buf)) == NULL)
|
||||||
@ -1051,13 +1052,13 @@ dump_sysinfo ()
|
|||||||
}
|
}
|
||||||
printf ("\n");
|
printf ("\n");
|
||||||
|
|
||||||
unsigned int ml_fsname = 4, ml_dir = 7, ml_type = 6;
|
unsigned ml_fsname = 4, ml_dir = 7, ml_type = 6;
|
||||||
|
|
||||||
struct mntent *mnt;
|
struct mntent *mnt;
|
||||||
setmntent (0, 0);
|
setmntent (0, 0);
|
||||||
while ((mnt = getmntent (0)))
|
while ((mnt = getmntent (0)))
|
||||||
{
|
{
|
||||||
int n = (int) strlen (mnt->mnt_fsname);
|
unsigned n = (int) strlen (mnt->mnt_fsname);
|
||||||
if (ml_fsname < n)
|
if (ml_fsname < n)
|
||||||
ml_fsname = n;
|
ml_fsname = n;
|
||||||
n = (int) strlen (mnt->mnt_dir);
|
n = (int) strlen (mnt->mnt_dir);
|
||||||
|
@ -31,7 +31,7 @@ int _impure_ptr;
|
|||||||
#define alloca __builtin_alloca
|
#define alloca __builtin_alloca
|
||||||
|
|
||||||
// Version string.
|
// Version string.
|
||||||
static char *SCCSid = "@(#)strace V1.0, Copyright (C) 2001 Red Hat Inc., " __DATE__ "\n";
|
static const char *version_string = "@(#)strace V1.0, Copyright (C) 2001 Red Hat Inc., " __DATE__ "\n";
|
||||||
|
|
||||||
static const char *pgm;
|
static const char *pgm;
|
||||||
static int forkdebug = 0;
|
static int forkdebug = 0;
|
||||||
@ -113,7 +113,6 @@ add_child (DWORD id, HANDLE hproc)
|
|||||||
children.next = new (child_list);
|
children.next = new (child_list);
|
||||||
children.next->next = c;
|
children.next->next = c;
|
||||||
lastid = children.next->id = id;
|
lastid = children.next->id = id;
|
||||||
HANDLE me = GetCurrentProcess ();
|
|
||||||
lasth = children.next->hproc = hproc;
|
lasth = children.next->hproc = hproc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -773,7 +772,7 @@ Usage: strace [OPTIONS] <command-line>\n\
|
|||||||
static void
|
static void
|
||||||
version ()
|
version ()
|
||||||
{
|
{
|
||||||
fprintf (stderr, SCCSid+4);
|
fputs (version_string + 4, stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct option longopts[] = {
|
struct option longopts[] = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user