X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2Fstdio%2Ftmpfile.c;h=cb942ff345114d58680939725c8777cacf2d230b;hp=432e3b97fe0a4a2e512d85cb51645a573afb1d4e;hb=d865c4403fc91d1f1ac95ba76febcee9f429bb97;hpb=2040228f27d623585d339dec175c4e779ca9edb5 diff --git a/platform/example/functions/stdio/tmpfile.c b/platform/example/functions/stdio/tmpfile.c index 432e3b9..cb942ff 100644 --- a/platform/example/functions/stdio/tmpfile.c +++ b/platform/example/functions/stdio/tmpfile.c @@ -8,12 +8,12 @@ #ifndef REGTEST +#include "_PDCLIB_glue.h" + #include #include #include -#include "_PDCLIB_glue.h" - #include #include #include @@ -47,7 +47,7 @@ struct _PDCLIB_file_t * tmpfile( void ) generate the filename candidate, which is *also* platform-dependent. */ unsigned int random; - fscanf( randomsource, "%u", &random ); + fscanf( randomsource, "%u", &random ); sprintf( filename, "/tmp/%u.tmp", random ); /* Check if file of this name exists. Note that fopen() is a very weak check, which does not take e.g. access permissions into account @@ -86,7 +86,9 @@ struct _PDCLIB_file_t * tmpfile( void ) #endif #ifdef TEST + #include "_PDCLIB_test.h" + #include int main( void ) @@ -110,4 +112,3 @@ int main( void ) } #endif -