Hello,
I am new to this mailing list.
I recognized that for mostly all print functions a _P version exists,
besides of vprintf. In a current project I need this one and I wondered
why it is not in th avr-libc.
I tried to at this function to the avr-libc and compile it on my own, but
it seems not to work, no error during compilation, but later I can`t use
it. After replacing my old library installation with the selfcompiled one
I still have undefined reference to `vprintf_P'.
My changes:
I added the file
avr-libc-1.6.8/libc/stdio/vprint_p.c
content of the file:
#include <stdarg.h>
#include <stdio.h>
#include "sectionname.h"
ATTRIBUTE_CLIB_SECTION
int
vprintf_P(const char *fmt, va_list ap)
{
return vfprintf_P(stdout, fmt, ap);
}
And after that I edited the header avr-libc-1.6.8/include/stdio.h
Added this:
/**
Variant of \c vprintf() that uses a \c fmt string that resides
in program memory.
*/
extern int vprintf_P(const char *__fmt, va_list __ap);
Is something more to do?
What I must do to add these changes(if they are really working) to your
project?
Thank you for your help
Christopher
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list