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)}}
${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)}
/* 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.
#include <sys/fcntl.h>
#include <sys/cygwin.h>
#include <ctype.h>
+#include <errno.h>
static const char version[] = "$Revision$";
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
{
{
char *buf;
DWORD len;
- int retval;
+ int err;
int (*conv_func) (const char *, char *);
if (!path_flag)
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)
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
{
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)