Mail Archives: djgpp-workers/2003/01/09/13:00:10
Hello.
Here is a cumulative patch of all the changes I've made to fileutils 4.1
since release 4. The only new bit is the change to enable /dev/zero
and /dev/full. (NB: /dev/zero is often used with 'dd'.)
Andrew, can you apply this next time you do a build for testing?
(You will need to apply the patch I've posted to fix bugs in /dev/zero,
if it hasn't been committed.)
Thanks, bye, Rich =]
diff -pu3r filutil4.1-rel/src/djstart.c filutil4.1-rel.work/src/djstart.c
--- filutil4.1-rel/src/djstart.c 2002-06-11 13:48:44.000000000 +0000
+++ filutil4.1-rel.work/src/djstart.c 2003-01-09 17:11:48.000000000 +0000
@@ -70,6 +70,10 @@
#include <io.h>
#include <crt0.h>
+#if (__DJGPP__ >= 3) || ((__DJGPP__ == 2) && (__DJGPP_MINOR__ >= 4))
+#include <sys/xdevices.h>
+#endif
+
int _crt0_startup_flags = _CRT0_FLAG_DROP_EXE_SUFFIX;
#ifndef _POSIX_SOURCE
@@ -189,6 +193,11 @@ djgpp_fileutils_startup (void)
init_stat_bits (argv0base);
init_file_io (argv0base);
+
+#if (__DJGPP__ >= 3) || ((__DJGPP__ == 2) && (__DJGPP_MINOR__ >= 4))
+ __install_dev_zero();
+ __install_dev_full();
+#endif
}
#endif /* __DJGPP__ */
diff -pu3r filutil4.1-rel/src/ls.c filutil4.1-rel.work/src/ls.c
--- filutil4.1-rel/src/ls.c 2002-10-06 10:33:32.000000000 +0000
+++ filutil4.1-rel.work/src/ls.c 2002-12-18 16:54:04.000000000 +0000
@@ -2155,6 +2155,13 @@ make_link_path (const char *path, const
if (linkname == 0)
return 0;
+#ifdef MSDOS
+ /* Any filename with a drive specification should be
+ * treated as an absolute pathname on MS-DOS. */
+ if (linkname[0] && (linkname[1] == ':'))
+ return xstrdup (linkname);
+#endif
+
if (*linkname == '/')
return xstrdup (linkname);
- Raw text -