avr.cfg: Added support for some stdio.h macros.

This commit is contained in:
Martin Ettl 2014-06-20 09:49:06 +02:00
parent ef81bc363a
commit be51637c1c
1 changed files with 12 additions and 1 deletions

View File

@ -117,5 +117,16 @@
<define name="tanhf" value="tanh"/> <define name="tanhf" value="tanh"/>
<define name="truncf" value="trunc"/> <define name="truncf" value="trunc"/>
<!-- The rest of the trigonometric functions are defined in std.cfg --> <!-- The rest of the trigonometric functions are defined in std.cfg -->
<!-- setjmp.h --> <!-- stdio.h -->
<define name="fdev_set_udata(stream, u)" value="do { (stream)- > udata = u; } while(0)"/>
<define name="fdev_get_udata(stream)" value="((stream)- > udata)"/>
<define name="_FDEV_SETUP_READ" value="__SRD"/>
<define name="_FDEV_SETUP_WRITE" value="__SWR"/>
<define name="_FDEV_SETUP_RW" value="(__SRD | __SWR)"/>
<define name="_FDEV_ERR" value="(-1)"/>
<define name="_FDEV_EOF" value="(-2)"/>
<define name="putc(__c, __stream)" value="fputc(__c, __stream)"/>
<define name="putchar(__c)" value="fputc(__c, stdout)"/>
<define name="getc(__stream)" value="fgetc(__stream)"/>
<define name="getchar()" value="fgetc(stdin)"/>
</def> </def>