avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] Missing vprintf_P in avr-libc


From: Christopher Hrabia
Subject: [avr-gcc-list] Missing vprintf_P in avr-libc
Date: Fri, 19 Feb 2010 12:34:59 +0100
User-agent: Opera Mail/10.10 (Linux)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]