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

Re: [MiNT] mintlib inline asm



Le Sat, 4 Sep 2004 15:29:03 +0200
Philipp Donzé <philipp.donze@epfl.ch> a écrit:

> Now I'm trying to correct the assembler inlines so I get it to compile 
> without errors. Later on I'll have to test it...

And this is not the least of the problems to compile the mintlib with
gcc-3. I am currently stuck in stdio subdir:

m68k-atari-mint-gcc -Wall -O2 -fomit-frame-pointer -nostdinc -I../stdio -I.. -I../include -I../mintlib -I../stdlib -I$(<../includepath) -DHAVE_CONFIG_H -D_LIBC -D_REENTRANT -c ../stdio/sprintf.c -o sprintf.o
../stdio/sprintf.c:31: warning: conflicting types for built-in function
`sprintf'
../stdio/sprintf.c: In function `sprintf':
../stdio/sprintf.c:37: error: `va_start' used in function with fixed args

In include/stdio.h, sprintf() is declared as:

extern int sprintf __P ((char *__restrict __s,
                         __const char *__restrict __format, ...));

The function declaration seems to be ok. However by comparing with other
software using va_* stuff, I tried to declare the function in
stdio/sprintf.c as:

int sprintf (char *s, const char *format, ...)

And it worked. The same modification must be done for stdio/sscanf.c
There is a complete patch attached to this message.
Note: the patch to mintlib/global.c is only for the "CRLF bug" in TOS.

-- 
Patrice Mandin
WWW: http://membres.lycos.fr/pmandin/
Programmeur Linux, Atari
Spécialité: Développement, jeux

Attachment: mintlib-0.57.5.diff.gz
Description: Binary data