Port of time.c as published by Apple (opensource.apple.com)
to djgpp
by

Prof. Dr. Burkhard Meiner
Universitt der Bundeswehr
Holstenhofweg 85
D-22043 Hamburg
Germany


The original sources were obtained from the Apple site using the 
following command:

wget -r --no-parent https://opensource.apple.com/source/shell_cmds/shell_cmds-170/

Make files
compile               compile program via cross-compilation (Linux -> djgpp)
compile.bat           native DOS compilation using djgpp
compile_for_unix      compilation of program for Linux host (obsolete)


Main modifications:

1)
system() instead of execvp()
This entails a small time overhead to load the command processor, but,
contrary to fork() and execvp(), works well under DOS

2)
removal of unassigned copyright strings (not accepted by djgpp)

3)
time calculation without timersub() (inexistent in djgpp)


Contrary to the much more refined GNU version of time, the getopt()    
routine used in the Apple sources does not differentiate properly between options passed 
to the time program and those passed to the timed program. Sometime it helps to
enclose the latter ones and the name of the timed program in quotation marks, but not always. 
                               ( ->  unixtime -l "ls -ltraR" )
Generally, the original version is incapable of accepting properly any options to the timed
program. I have, therefore, made  the compile_for_unix routine produce one version of the
MSDOS-modified program for Linux - for what it is worth.

The MSDOS-modified own version gets around some of the problems by re-copying the command line.

Burkhard Meiner


