[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Toswin 2.5 tw100-fix



On Tue, Feb 01, 2000 at 12:49:43AM +0200, Martin-Eric Racine wrote:
> > > Even once the paths for the includes are fixed, this one cannot
> > > be recompiled anymore, because EOS is not defined anywhere now.
> > > It used to be defined in stdio.h, as follow:
> >  
> > EIHNDL was defined in atarierr.h, but is nowhere anymore, nor are
> > there any replacement stated anywhere in errno.h.
> 
> Even after it was replaced with EBADF (I really had to look
> hard for this one) and EOS was put back again as:

You could just as well have a look at your mails.  I already explained you
how to re-activate the old names.

> #ifndef __STRICT_ANSI__
> #define	EOS		'\0'		/* end-of-string indicator */
> #endif

I promise that this macro will never make it back again into stdio.h.

> I still got this error:
> 
> /tmp/clipbrd.o(.text+0x1f8): undefined reference to `iswhite'
> /tmp/clipbrd.o(.text+0x27a): undefined reference to `iswhite'
> /tmp/clipbrd.o(.text+0x2f4): undefined reference to `iswhite'
> /tmp/clipbrd.o(.text+0x372): undefined reference to `iswhite'
> /tmp/clipbrd.o(.text+0x3f0): undefined reference to `iswhite'
> /tmp/proc.o(.text+0x62c): undefined reference to `_write_utmp'
> /tmp/proc.o(.text+0x9c6): undefined reference to `_write_utmp'
> /tmp/proc.o(.text+0xbf0): undefined reference to `_write_utmp'
> make: *** [ntw.app] Error 1
> make: Target `all' not remade because of errors.
> 
> At this point, I really have no clue what to fix, except that
> ctype.h used to define iswhite previously.

As for "iswhite" simply use the correct macros.  Either "isspace" (returns
true for any whitespace character) or "isblank" (returns true for blank
characters, i. e. space and horizontal tab).  The latter is a GNU
extension.  You therefore have to give your gcc the option "-D_GNU_SOURCE"
to use this macro.

The internal library functions "_write_utmp" and "_write_wtmp" have been
removed (ding, dong, you were asking for a standard compliant utmp/wtmp
handling).  As a quick replacement you can simply use "login ()" (see the
manpage login(2) on another system).  But there are also lastlog/faillog
entries to be written if applicable.  This will cause some headaches but
I'm in contact with Christian Felsch about this.

If you don't want to fiddle around with "login()" simply 

	ar x /usr/lib/oldlib/libc.a utmp.o
	ar r /usr/lib/libc.a utmp.o
	ranlib /usr/lib/libc.a

(extract "utmp.o" from an old MiNTLib, stuff it into your new one and run
ranlib over the modified lib).

Ciao

Guido
-- 
http://stud.uni-sb.de/~gufl0000/
mailto:guido@freemint.de