Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-02-21 07:51:15 +0300
committerChristopher Faylor <me@cgf.cx>2004-02-21 07:51:15 +0300
commit7c03f79971ed1e8ab3ad8818747444b60ed8cd38 (patch)
tree01a3302b4b3af940a5739a40c488f57ed4613e4a
parent3a0f12b5885fa877c3365ef0ff114346f21ce92c (diff)
* Makefile.in (build_dumper): Detect missing iconv library.
* cygpath.cc (dowin): Report on filename conversion errors. (doit): Ditto. * strace.cc (main): Use symbolic constant for _STRACE_ALL when setting mask.
-rw-r--r--winsup/utils/ChangeLog10
-rw-r--r--winsup/utils/Makefile.in4
-rw-r--r--winsup/utils/cygpath.cc32
-rw-r--r--winsup/utils/strace.cc2
4 files changed, 35 insertions, 13 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog
index 18910f5ee..943666cee 100644
--- a/winsup/utils/ChangeLog
+++ b/winsup/utils/ChangeLog
@@ -1,3 +1,13 @@
+2004-02-20 Christopher Faylor <cgf@redhat.com>
+
+ * Makefile.in (build_dumper): Detect missing iconv library.
+
+ * cygpath.cc (dowin): Report on filename conversion errors.
+ (doit): Ditto.
+
+ * strace.cc (main): Use symbolic constant for _STRACE_ALL when setting
+ mask.
+
2004-02-14 Corinna Vinschen <corinna@vinschen.de>
* ssp.c (opts): Add leading '+' to force posixly correct behaviour.
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index 3a5291104..e6069891f 100644
--- a/winsup/utils/Makefile.in
+++ b/winsup/utils/Makefile.in
@@ -36,9 +36,10 @@ override CXXFLAGS+=-fno-exceptions -fno-rtti -DHAVE_DECL_GETOPT=0
include $(srcdir)/../Makefile.common
+LIBICONV:=@libiconv@
libbfd:=${shell $(CC) -B$(bupdir2)/bfd/ --print-file-name=libbfd.a}
libintl:=${shell $(CC) -B$(bupdir2)/intl/ --print-file-name=libintl.a}
-build_dumper:=${shell test -r $(libbfd) && test -r ${libintl} && echo 1}
+build_dumper:=${shell test -r $(libbfd) -a -r $(libintl) -a -n "$(LIBICONV)" && echo 1}
libz:=${shell x=$$($(CC) -mno-cygwin --print-file-name=libz.a); cd $$(dirname $$x); dir=$$(pwd); case "$$dir" in *mingw*) echo $$dir/libz.a ;; esac}
zlib_h:=-include ${patsubst %/lib/mingw/libz.a,%/include/zlib.h,${patsubst %/lib/libz.a,%/include/zlib.h,$(libz)}}
@@ -63,7 +64,6 @@ ALL_LDLIBS:=${patsubst $(w32api_lib)/lib%.a,-l%,\
${filter-out $(libkernel32),\
${filter-out $(libcygwin), $(ALL_DEP_LDLIBS)}}}}
-LIBICONV:=@libiconv@
MINGW_LIB:=$(mingw_build)/libmingw32.a
DUMPER_LIB:=${libbfd} ${libintl} -L$(bupdir1)/libiberty $(LIBICONV) -liberty
MINGW_LDLIBS:=${filter-out $(libcygwin),$(ALL_LDLIBS) $(MINGW_LIB)}
diff --git a/winsup/utils/cygpath.cc b/winsup/utils/cygpath.cc
index 070b19bdc..cb6491642 100644
--- a/winsup/utils/cygpath.cc
+++ b/winsup/utils/cygpath.cc
@@ -1,5 +1,5 @@
/* cygpath.cc -- convert pathnames between Windows and Unix format
- Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
This file is part of Cygwin.
@@ -20,6 +20,7 @@ details. */
#include <sys/fcntl.h>
#include <sys/cygwin.h>
#include <ctype.h>
+#include <errno.h>
static const char version[] = "$Revision$";
@@ -391,8 +392,11 @@ dowin (char option)
if (!windows_flag)
{
- cygwin_conv_to_posix_path (buf, buf2);
- buf = buf2;
+ if (cygwin_conv_to_posix_path (buf, buf2))
+ fprintf (stderr, "%s: error converting \"%s\" - %s\n",
+ prog_name, buf, strerror (errno));
+ else
+ buf = buf2;
}
else
{
@@ -410,7 +414,7 @@ doit (char *filename)
{
char *buf;
DWORD len;
- int retval;
+ int err;
int (*conv_func) (const char *, char *);
if (!path_flag)
@@ -441,10 +445,12 @@ doit (char *filename)
if (path_flag)
{
if (unix_flag)
- cygwin_win32_to_posix_path_list (filename, buf);
+ err = cygwin_win32_to_posix_path_list (filename, buf);
else
{
- cygwin_posix_to_win32_path_list (filename, buf);
+ err = cygwin_posix_to_win32_path_list (filename, buf);
+ if (err)
+ /* oops */;
if (shortname_flag)
buf = get_short_paths (buf);
if (longname_flag)
@@ -452,6 +458,12 @@ doit (char *filename)
if (mixed_flag)
buf = get_mixed_name (buf);
}
+ if (err)
+ {
+ fprintf (stderr, "%s: error converting \"%s\" - %s\n",
+ prog_name, filename, strerror (errno));
+ exit (1);
+ }
}
else
{
@@ -461,13 +473,13 @@ doit (char *filename)
else
conv_func = (absolute_flag ? cygwin_conv_to_full_win32_path :
cygwin_conv_to_win32_path);
- retval = conv_func (filename, buf);
+ err = conv_func (filename, buf);
if (mixed_flag)
buf = get_mixed_name (buf);
- if (retval < 0)
+ if (err)
{
- fprintf (stderr, "%s: error converting \"%s\"\n",
- prog_name, filename);
+ fprintf (stderr, "%s: error converting \"%s\" - %s\n",
+ prog_name, filename, strerror (errno));
exit (1);
}
if (!unix_flag)
diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc
index 633aa55a9..2d16b69c7 100644
--- a/winsup/utils/strace.cc
+++ b/winsup/utils/strace.cc
@@ -985,7 +985,7 @@ character #%d.\n", optarg, (int) (endptr - optarg), endptr);
error (0, "must provide a process id to toggle tracing");
if (!mask)
- mask = 1;
+ mask = _STRACE_ALL;
if (bufsize)
setvbuf (ofile, (char *) alloca (bufsize), _IOFBF, bufsize);