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

2005-09-06 Thread Björn Haase
Bernard Foche wrote: 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 is acceptable. And a functionning alloca() is always handy. We *are* already having a working alloca. It's within gcc. Only

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 Bernard Fouché
Joerg Wunsch wrote: As malloc() was `in' there (from fdevopen()) anyway, it came in handy. 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

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 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 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: . The get backend function can now return -2 to indicate an end-of-file condition, in addition to -1 for an error condition. This will affect the internal state that can be queried using the standard feof() and ferror() functions. The documentation says

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

2005-09-05 Thread Russell Shaw
Joerg Wunsch wrote: 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