Notes from porting Fileutils 4.1 to DJGPP
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   CONFIG_SITE=$(pwd)/djgpp/config.site ./configure --disable-nls

lib/lstat.c - This needs a definition of S_ISLNK when S_ISLNK & S_IFLNK
are not available.
. LATER: Actually, modify lib/xstat.in.
+++OK

src/chown-core.c - This needs a definition of S_ISLNK for the case where
it's not defined.

src/copy.c - This mixes use of S_ISLNK with and without #ifdef S_ISLNK/#endif
enclosure. This seems semantically broken. It should either used
#ifdef/#endif in all cases, or define S_ISLNK when it's not defined.

TODO: Why can't	I link djstart.c into shred?
. Hmmm, seems to work now - dodgy gcc/binutils thing?
+++OK

TODO: configure should define FILESYSTEM_* macros in config.h that should
cope with drive letters, but it doesn't work. Why? Because it doesn't
actually test for DOS/Windows! Once this is fixed, we can remove some
FILESYSTEM_* defs from:

. lib/basename.c
+++DONE

TODO: Bug in dirname.c - uses FILESYSTEM_PREFIX_LEN macro on newpath ->
error when non-default version of macro used (e.g. MS-DOS).
. Need to be careful about mods to ISSLASH.

TODO: path_concat() in lib/path-concat.c needs a new patch, to have
the functionality that Fileutils 4.0's did.
+++DONE

TODO: Patch lib/userspec.c
+++OK

TODO: Update src/sys2.h's DOT_OR_DOTDOT macro to handle DOS properly.
+++NO, what was I talking about? This seems OK.

TODO: Remove my name & e-mail address from comments in sources.
+++NO, leave it!

Original patches applied to programs, perhaps by hand in some cases:

. dd
. df
. ls
. dircolors
. install
. ln (not needed!)
. chgrp
. du
. rm
. mv

TODO: Check all sources for potential porting problems.

TODO: Fix 'chgrp -v foo ls' where foo != login group.
+++DONE

TODO: Use internationalisation, where possible, in patches, e.g. directory
hacks in remove.c.

TODO: Test suite Makefiles need to mod PATH properly - i.e. add with semicolon:

    PATH="`pwd`/../../src;$$PATH"

TODO: src/mv.c, src/remove.c
+++OK

TODO: Audit use of MSDOS vs. __DJGPP__.

TODO: Look at effect of #ifdef S_ISLNK/#endif usage in src/copy.c.
+++OK

TODO: configure script doesn't find perl 5.6.1?
. Hmmm, looks like it should work, but just use 'PERL=perl ./configure'
  workaround.
+++OK

TODO: configure test that tests whether a running file can be unlinked
should fail with DJGPP!
. unlink() works on running files on some platforms, but not on others.
  Hardcode the result in our config.site.
+++OK

TODO: Can set directory times on Windows 2000 and later?
. Ignore that ability for now, so that touch behaves the same on
all DOS-supporting platforms. It be confusing otherwise.
+++OK

Richard Dawe <rich@phekda.freeserve.co.uk> 2002-04-11
