Index: mincl
From: knarf@nasim.cube.net (Frank Bartels)
Date: 22 Jul 1994 06:30:31 +0200
Message-ID: <m0qQvta-000OGwC@nasim.cube.net>

Here's a small bugfix for the 'mincl' file. bammi's gcc doesn't care
about it, but Andreas Schwab's MiNT gcc does.
-------------------------------------------------------------
Index: ioctl.c tcattr.c include/ioctl.h include/termios.h
From: nox@jelal.north.de (Juergen Lock)
Date: 18 Aug 1994 18:27:42 +0200
Message-ID: <9408171903.AA00235@jelal.north.de>

first termios patches, getting stty (shellutils) running
-------------------------------------------------------------
Index: strerror.c
From: entropy@terminator.rs.itd.umich.edu (Nicholas S Castellano)
Date: 19 Aug 1994 06:43:21 +0200
Message-ID: <199408182319.TAA26772@terminator.rs.itd.umich.edu>

baserel bug: go back to pl44 version (remove a few `const')
-------------------------------------------------------------
Index: tcattr.c include/termios.h
From: schwab@issan.informatik.uni-dortmund.de (Andreas Schwab)
Date: 22 Aug 1994 19:44:09 +0200
Message-ID: <9408220852.AA19173@issan.informatik.uni-dortmund.de>

Addition to Juergen's patches for the termios emulation in MiNTlib:

I've changed the CS? values to match _TF_?BIT so that they can be
copied more easily, and fixed a bug in his patch.
And i added code for backward compatibility since TIOCSETP has changed.
-------------------------------------------------------------
Index: getgroup.c getitimer.c getloadavg.c initgroups.c osbind.cpp
	setegid.c seteuid.c setitimer.c include/limits.h
	include/mintbind.h include/osbind.h include/param.h
	include/time.h include/unistd.h
From: schwab@issan.informatik.uni-dortmund.de (Andreas Schwab)
Date: 29 Aug 1994 18:03:34 +0200
Message-ID: <9408290852.AA11271@issan.informatik.uni-dortmund.de>

Here are interfaces for the new functions that MiNT 1.11 provides
(getloadavg, set/getitimer, initgroups) and some changes to existing
functions to use the new features, as well as some bug fixes.

In <limits.h> i have changed _POSIX_NGROUPS_MAX to 8 since this is the
value MiNT provides.
-------------------------------------------------------------
Index: strerror.c
From: benni@schlunz.dfki.uni-sb.de (Benjamin Lorenz)
Date: 12 Aug 1994 18:02:29 +0200
Message-ID: <9408121121.AA19308@pfsparc02.phil15.uni-sb.de>

While we are talking about strerror.c, what about changing "access denied"
into "permission denied"? I'd like that because it's more polite... :-)
-------------------------------------------------------------
Index: setvbuf.c
From: schwab@issan.informatik.uni-dortmund.de (Andreas Schwab)
Date: 30 Aug 1994 14:34:04 +0200
Message-ID: <9408300854.AA02166@issan.informatik.uni-dortmund.de>

This patch makes the function setvbuf more robust by checking the
bmode parameter.
-------------------------------------------------------------
Index: tcattr.c include/ioctl.h include/termios.h
From: nox@jelal.north.de (Juergen Lock)
Date: 1 Sep 1994 10:59:47 +0200
Message-ID: <9409010231.AA00068@jelal.north.de>

added ECHOCTL to sg_flags (and termios) so e.g. mgetty can turn it off
and won't echo the \r after your login name as ^M...
-------------------------------------------------------------
Index: setegid.c seteuid.c setregid.c setreuid.c
From: inf03@Uni-Trier.de (Sascha Blank)
Date: 5 Sep 1994 19:42:51 +0200
Message-ID: <9409051059.AA07720@Uni-Trier.De>

replace some files in the MiNTlibs, since the
library doesn't handle the sete[ug]id() correctly and doesn't know about
the setre[ug]id() calls.

From: hohmuth@inf.tu-dresden.de (Michael Hohmuth)
Date: 12 Sep 1994 20:21:29 +0200
Message-ID: <199409121547.AA17497@irs.inf.tu-dresden.de>

bugfixes
-------------------------------------------------------------
Index: tcattr.c
From: nox@jelal.north.de (Juergen Lock)
Date: 17 Sep 1994 17:23:40 +0200
Message-ID: <9409170027.AA00250@jelal.north.de>

compatibility fix (VTIME)
-------------------------------------------------------------
Index: link.c mkdir.c opendir.c rename.c rmdir.c symlink.c
	truncate.c utime.c
From: nox@jelal.north.de (Juergen Lock)
Date: 17 Sep 1994 17:23:40 +0200
Message-ID: <9409170027.AA00250@jelal.north.de>

more EEXIST/EACCESS, ENOTDIR/ENOENT errno fixes...
-------------------------------------------------------------
Index: include/time.h
From: nox@jelal.north.de (Juergen Lock)
Date: 17 Sep 1994 17:23:40 +0200
Message-ID: <9409170027.AA00250@jelal.north.de>

fix cpp errors with e.g. `#if CLK_TCK != 0'
-------------------------------------------------------------
Index: include/unistd.h
From: nox@jelal.north.de (Juergen Lock)
Date: 17 Sep 1994 17:23:40 +0200
Message-ID: <9409170027.AA00250@jelal.north.de>

fix warnings about _POSIX_VDISABLE redefined
-------------------------------------------------------------
Index: include/termios.h
From: nox@jelal.north.de (Juergen Lock)
Date: 17 Sep 1994 17:23:40 +0200
Message-ID: <9409170027.AA00250@jelal.north.de>

fix configure :) (include compiler.h)
-------------------------------------------------------------
Index: strerror.c
From: schwab@issan.informatik.uni-dortmund.de (Andreas Schwab)
Date: 9 Nov 1994 22:34:04 +0100
Message-ID: <9411091057.AA06643@issan.informatik.uni-dortmund.de>

The error message for ELOCKED is missing in strerror.c.  I have used
the text from the comment in errno.h.
-------------------------------------------------------------
Index: libgcc2.c mincl
From: schwab@issan.informatik.uni-dortmund.de (Andreas Schwab)
Date: 11 Nov 1994 10:38:52 +0100
Message-ID: <9411110930.AA20927@issan.informatik.uni-dortmund.de>

changes to support gcc 2.6:

- libgcc2.c has new modules (_op_vnew.o _op_vdel.o _eh.o _pure.o), and
there are a few bug fixes and cleanups.
-------------------------------------------------------------
Index: include/linea.h
From: schwab@issan.informatik.uni-dortmund.de (Andreas Schwab)
Date: 11 Nov 1994 10:38:52 +0100
Message-ID: <9411110930.AA20927@issan.informatik.uni-dortmund.de>

changes to support gcc 2.6:

- in <linea.h> the macro linea0() has to be changed so that it
compiles with -mbaserel, otherwise gcc dies with "fixed or forbidden
register has been spilled".  This is probably a bug in gcc since
similar problems occured with the Linux/x86 kernel, where they had to
change some asm statements to work around this, too.
-------------------------------------------------------------
Index: include/mintbind.h
From: inf03@Uni-Trier.de (Sascha Blank)
Date: 5 Sep 1994 19:42:51 +0200
Message-ID: <9409051059.AA07720@Uni-Trier.De>

replace some files in the MiNTlibs, since the
library doesn't handle the sete[ug]id() correctly and doesn't know about
the setre[ug]id() calls.
-------------------------------------------------------------
Index: lib.h malloc.c realloc.c
From: schwab@issan.informatik.uni-dortmund.de (Andreas Schwab)
Date: 13 Dec 1994 11:15:54 +0100
Message-ID: <9412121106.AA07748@issan.informatik.uni-dortmund.de>
References: <9412121003.AA12541@faust4.lstm.uni-erlangen.de>

[...] make it possible for free() to return
memory blocks back to the system, so that the process size can shrink.
This was part of my patches for emacs, but i'm using this all the
time, not only for emacs.
-------------------------------------------------------------
Index: chmod.c chown.c closedir.c do_stat.c fork.c getgid.c
	getpid.c getppid.c getuid.c kill.c killpg.c opendir.c
	readdir.c rewinddi.c sync.c
Message-Id: <9501311012.AA08775@math.uni-muenster.de>
From:	Ulrich Kuehn <kuehn@goedel.uni-muenster.de>
Date:	Tue, 31 Jan 1995 11:12:57 +0100

Hi there!

Here is a patch for the mintlib (based on pl44) for some of the files
(opendir/readdir/closedir/rewinddir/stat/kill/killpg/chown/chmod/fork/
getuid/getgid/getpid/getppid/sync)
to get rid of the MiNT-dependencies. Now only the existence of the
system call is tested, not the __mint variable.
This stuff is already tested a bit under Mag!C, so it should work.

adopted to (internal) 45.4, indentation fixes...
-------------------------------------------------------------
Index: README
X-Date: 1995/02/11 20:31:12
X-From: nox

added note about diff -w (*sigh*)
-------------------------------------------------------------
Index: include/limits.h
X-Date: 1995/02/11 20:35:28
X-From: nox

upped NAME_MAX to 128 for minixfs pl 11...
-------------------------------------------------------------
Index: PatchLev.h fread.c fwrite.c mincl mkfifo.c mknod.c open.c
	rename.c strerror.c
X-Date: 1995/02/11 20:57:02
X-From: nox

made fread/write more robust against NULL *s, added missing fns to mincl,
(experimental) mkfifo/pty mknod `emulation'

internal release pl 45.4.1
-------------------------------------------------------------
Index: linea.c
From: Thomas Schulze <ts@uni-paderborn.de>
Date: Tue, 14 Feb 1995 14:10:01 +0100
Message-Id: <199502141310.OAA25753@austria.uni-paderborn.de>

linea0() update (gcc 2.6.3)
-------------------------------------------------------------
Index: PatchLev.h rmdir.c include/PatchLev.h
X-Date: 1995/02/18 17:31:10
X-From: nox

rmdir bugfix, internal release pl 45.5
-------------------------------------------------------------
Index: AUTHORS README README.46 README.FAQ
X-Date: 1995/02/21 20:49:28
X-From: nox

doc updates from knarf... with some changes by me
-------------------------------------------------------------
Index: ChangeLog
X-Date: 1995/03/05 15:28:36
X-From: nox

new file, changes since pl 45
-------------------------------------------------------------
Index: MKChangeLog.pl
X-Date: 1995/03/05 15:30:24
X-From: nox

added to distribution, maybe its useful for others...
-------------------------------------------------------------
Index: PatchLev.h include/PatchLev.h
X-Date: 1995/03/05 15:49:10
X-From: nox

ok you've been waiting long enough...  call this pl46 :)
-------------------------------------------------------------
Index: ChangeLog
X-Date: 1995/03/05 16:15:08
X-From: nox

updated, pl46
-------------------------------------------------------------
Index: include/mintbind.h
Message-Id: <9501311049.AA09298@math.uni-muenster.de>
From:	Ulrich Kuehn <kuehn@goedel.uni-muenster.de>
Subject: New system calls in mintbind.h
Date:	Tue, 31 Jan 1995 11:49:13 +0100

Hi!

Here is a patch for the mintbind.h file (based of pl 44), but it is
only for the gnu compiler.
-------------------------------------------------------------
Patch Level 47:

Index:access.c fopen_i.c getpass.c mincl open.c truncate.c
Date: Mon, 24 Apr 1995 19:37:24 +0200
From: Wolfgang Lux <lux@heidelbg.ibm.com>

Here are some bugs fixes for the MiNT libs PL 46 which where floating
around on my harddisk for some days already :-).

In mincl I added the initgroups.o and getloadavg.o to the list of
targets; somehow they didn't manage into the distribution.

The access function wasn't using the supplementary groups for checking
access rights. (May be it would be worth to include a Faccess routine
in the kernel so access can definitely report the kernel's opinion on
access rights instead of the library implementor's opinion.)

Truncate always returned -1 when the call to Dcntl did not return
EINVAL, even if the call succeeded.

In the getpass routine now uses a longer buffer, so there is room for
some line editing (remember that MiNT's tty driver does no line buffering).

In the open function I fixed the check that a file cannot be truncated when
opened read-only; the old check was just a no-op. Now open should really
return an access denied error (as the comment already suggested).

Finally the fopen_i function does not need to fseek to the end-of-file
when a file is opened in append mode, as this is already done by open.
Also if someone reenables the code again (for any reason I can't think of),
I made sure that the _cnt field of the file is cleared before the call to
fseek. This missing initialization could result in garbage at thebeginning
of a file if the file had been written to, then closed and then opened
again. (This was the reason for a hard to find bug in my port of cvs :-)

NOTE: patch implemented in PL47 with a couple of bug-fixes from
Andreas Schwab.  --Yves Pelletier

----------------------------------------------------------------------

Index: chdir.c chmod.c chown.c do_stat.c getcwd.c lib.h link.c main.c
mkdir.c mkfifo.c mknod.c open.c opendir.c readdir.c rename.c rmdir.c
spawn.c statfs.c symlink.c sysconf.c system.c truncate.c ttyname.c
unlink.c unx2dos.c utime.c include/support.h

Date: Mon, 11 Sep 95 10:56:39 +0200
From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>

The current handling of filenames in the MiNTlib is very fragile.  If
names longer than PATH_MAX are passed the stack gets overwritten when
converting the name to GEMDOS format.  Here is a patch that makes it
more robust by adding another parameter to _unx2dos and _dos2unx that
spezifies the size of the output buffer.  (The compatibility functions
unx2dos and dos2unx remain unchanged.)  Filenames longer than PATH_MAX
are simply truncated.

----------------------------------------------------------------------

Index: abort.c alarm.c buffindf.c console.c do_lock.c dup.c dup2.c
enoent.c execp.c fcntl.c fstat.c getcwd.c getdtabl.c getegid.c geteuid.c
getgroup.c getloadavg.c getpid.c getrusag.c isatty.c killpg.c link.c
main.c mkdir.c mkfifo.c mktemp.c nice.c open.c pgrp.c rename.c rmdir.c
seekdir.c setegid.c seteuid.c setgid.c setregid.c setreuid.c setrlimi.c
setuid.c sigactio.c sigblock.c signal.c strerror.c symlink.c sysconf.c
tcdrain.c telldir.c times.c truncate.c utime.c wait.c wait3.c wait4.c
waitpid.c 
Date: Wed, 24 Jan 96 14:20:41 +0100
From: Dirk Stadler <dirk@lstm.uni-erlangen.de>

NOTE: The original patch included changes to pause.c and thread.c.
Those changes were not included in PL47 for the following reasons:
1. pause.c changes attempted to evaluate return values from void 
functions.
2. thread.c changes were removed on the grounds of objections from
Holger Kleinschmidt <holgerkl@cs.tu-berlin.de>


Hello,

once again I try to get your attention. In December a posted a patch, which removes the __mint
dependencies from about 40 files of the MINTLIB46. Now I have a new patch with fixes some problems
of the old one:

- isatty.c got broken.
- mktemp.c and buffindf.c, too.
- a new patch for open.c, which allows to open pipes with mode (... | O_CREAT) on MagiC.

----------------------------------------------------------------------

Index: tzfile.h private.h include/time.h strftime.c utime.c crtinit.c localtim.c
stime.c timeofday.c
Date: July 5, 1996
From: Jerry Geiger <jerry@zedat.fu-berlin.de>

NOTE: tzfile.h and private.h are local header files that belong in 
the MiNTlib directory.  They are not part of mntinc47.tgz.  --YP

What are these patches for?

They make ftime and gettimeofday returning usefull usec resp. msec
values (of course only 5ms clock ticks). I have implemented this
much alike Kay Roemer in his portlib. For problems see comments
in timeoday.c.
I splitt stime() from 'utime.c' cause one never needs it and
it has to change a variable in 'timeoday.c'. So of course I moved 
settimeofday() to 'stime.c'.

These patches implement as a second the POSIX time zone concept.
Therefore the minimum stack size has to be 9K, as a figured out in tests.
So crtinit.c is to change; aside of recompiling all functions using time.h,
cause the tm structure changes.

The time zone and daylight saving information is now read from a
tzfile or from an environment Variable TZ with following
syntax:
TZ=<time zone name><offset><daylight saving name>,<begin of dst>,<end of dst>
<time zone name>: name of the local time zone (e.g: "MET")
<offset>:  [-]h[h[mm]]  :local time + offset = UTC/GMT time
<daylight saving name> name of the local time zone during dst (e.g: "MET DST")
<begin of dst>: M<m>.<w>.<d>
	where <m> is month in year (1-12)
              <w> is week in month (1-5, 5 == last week)
	      <d> is day of week (0-6, 0 == Sunday)
<end of dst>:  M<n>.<n>.<n>
	different syntax is posible, see POSIX etc. docs

example for middel european time
	TZ=MET-1MET DST,M3.5.0,M10.5.0

struct tm has now two additional members:
 	char *tm_zone;   /* abbreviation of timezone name */
 	long tm_gmtoff;  /* offset from UTC in seconds */
if tm_isdst is 1 you will have to add an additional hour
to tm_gmtoff for local time.

The time zone name is available too from
char *tzname[2]. (if isdts != -1 use it as index)

The additional functions
	time_t time2posix(time_t t);
	time_t posix2time(time_t t);
to caculate a posix time value (leap seconds) from a time
value an vice versa are included, too.

This all isn't quite what I wanted first, but better than nothing
and it seems to work.

So long,  jerry@zedat.fu-berlin.de

-------------------------------------------------------------------------

Index: do_stat.c
Date: Sat, 7 Jun 1997 07:38:10 +0200 (MET DST)
From: Petr Stehlik <stehlik@cas3.zlin.vutbr.cz>

   Hi,

finally I know why PARCP has problems with reading CD-ROM directories -
there's a bug in stat() of MiNTlibs pl46. The patch follows:

@@ -69,12 +68,17 @@
 	/* try to use the build in stat() call, but if the system does not
 	 * have it, record that and never try again
 	 */
+	/* actually we can't do that, because Fxattr() works for MetaDOS devices
+	 * but returns -EINVAL for other GEMDOS devices. Really unhappy solution.
+	 * Since I don't want to patch chdir() and other calls I simply have to
+	 * test the presence of Fxattr() every time the stat() is called.
+	 * PS 970606
+	 */
+
-------------------------------------------------------------------------

Index: Makefile
Date: 27 June 1997
From: Yves Pelletier <ypell@cam.org>

Created variable PROCOPT in Makefile to allow specific options to be passed
depending on processor type. (Some versions of gcc need -fno-defer-pop to
generate correct 68000 code.)

-------------------------------------------------------------------------
Index: time.c
/* 
 * changes for UTC kernel time by jerry g geiger Apr 97
 * using recommanded 'CLOK' cookie:
 * val:		&xff000000   bitfield
 			&x00000000   reserved
			&x00ffffff   offset from UTC in seconds
 */

-------------------------------------------------------------------------
Index: getcooki.c (new)
/* 
 * Getcookie for MiNTlib
 * 
 * jerry g geiger
 
 * returns 0 if Cookie was found, 1 if not
 * returns cookie val in val if found, 0 if not
 */
_________________________________________________________________________
Index: fseek.c ftell.c buffindf.c
From Markus_Kohm@HD.maus.de Thu Aug 14 17:56:57 1997
Date: Wed, 13 Aug 1997 10:36:00 +0100
From: Markus Kohm <Markus_Kohm@HD.maus.de>
To: ypell@CAM.ORG
Subject: MiNTLIB PL47
fseek.c, ftell.c:
 There were more fflush than needed. fflush is ever done if filemode is not
 binary, but this is not neccessary, because filebuffer of textmode and
 binarymode are same. The handling of textmode is at read- and write-
 functions, so fseek an ftell need no seperate handling.
 Changing the functions can increase random access very much!

buffindfile.c:
 This function addes DIRSEP1 even if there was a DIRSEP1 or DIRSEP2. So if
 there are wrong but often found environment-definitions like
        SOMEPRGSHOME=C:\APPLICATIONS\SOMEPRG\
 and you do something like
        env = getenv( "SOMEPRGSHOME" );
        findfile( "SOMEPRG.INF", env, NULL );
 _buffindfile searchs for C:\APPLICATIONS\SOMEPRG\/SOMEPRG.INF.
 Changing
        *s++ = DIRSEP1;
 to
        if ( s == try || ( s[-1] != DIRSEP1 && s[-1] != DIRSEP2 ) )
          *s++ = DIRSEP1;
 will solve this problem.
 BUG: errno should not be changed if file was found!
 I think it would be nice to have a casinsensitiv filefind, but to get this
 EXIST must be changed to a function using opendir/readdir and stricmp.


<End of changes for PL47>
