Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-06 Thread Björn Haase
Russell Shaw wrote on Dienstag, 6. September 2005 04:45 : - The INTERRUPT() macro has been deprecated, and it will be removed in a future version. Use __attribute__((interrupt)) explicitly if this functionality is really needed. Maybe instead of interrupt, you could use

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-06 Thread Joerg Wunsch
As Bernard Fouche wrote: Errm, you'd still need to supply a dummy implementation for malloc() anyway when using the floating-point versions. ... Now why not have an alloca(3) in libc? Sure it is not the best way to manage dynamic memory but vfprintf/scanf are typicall applications where it

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-06 Thread Joerg Wunsch
As Bernard Fouché wrote: (about [not] malloc()ing the FP conversion buffer) Of course, if there's consensus among the users that this is not needed, and an additional 40 bytes on the stack are no big deal for the floating-point versions, we could easily drop that completely, and always

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-06 Thread Erik Christiansen
On Tue, Sep 06, 2005 at 10:24:34AM +0200, Joerg Wunsch wrote: How about the following: #ifdef __STDIO_FDEVOPEN_COMPAT_12 /* discontinued version */ extern FILE *fdevopen(int (*__put)(char), int (*__get)(void), int __opts); #else /* version of avr-libc 1.4 and above

[avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-05 Thread Joerg Wunsch
(Accumulated followup to several replies.) As Dmitry K. wrote: It is possible to facilitate transition to a new variant: 1. To change the order of arguments 'put' as: int (*put)(FILE *, char) -- int (*put)(char, FILE *) It would allow to leave the asm program 'put' without

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-05 Thread Bernard Fouché
Joerg Wunsch wrote: As the malloc()-less API change is long overdue, I'd rather move that in by the same time. We're going to have a new library minor version number, so we are eligible for an API change anyway. Great! How about the following API: #define __STDIO_FBUF_SIZE

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-05 Thread David Kelly
On Sep 5, 2005, at 9:19 AM, Joerg Wunsch wrote: 1. To change the order of arguments 'put' as: int (*put)(FILE *, char) -- int (*put)(char, FILE *) It would allow to leave the asm program 'put' without changes. But only these. ;-) For C programs, they'd yield a compile-time error

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-05 Thread Joerg Wunsch
As Joerg Wunsch wrote: -in stdio.h: #define STDIO_SETUP(stream,buf,put,get,flags) FILE stream={buf,\ 0,\ flags,\ sizeof(buf),\ 0,\ put,\ get} That might basically

Re: [avr-gcc-list] Re: [avr-libc-dev] Please have a look at avr-libc patch #3750

2005-09-05 Thread Bernard Fouche
Joerg Wunsch wrote: Errm, you'd still need to supply a dummy implementation for malloc() anyway when using the floating-point versions. vfprintf() or vfscanf() will cause reference to malloc() [and free()] as they do not know at link-time they won't really be needed. Now why not have an