]> pd.if.org Git - pdclib/blobdiff - platform/example/functions/stdio/tmpfile.c
* Test cleanups: surround the code for all functions by #ifndef REGTEST
[pdclib] / platform / example / functions / stdio / tmpfile.c
index 255a35eb75721d58d352cd1279a1dd7f3fdda622..3f384e7d6ef44431ebbba5a473feb764e19cafe4 100644 (file)
 
 #ifndef REGTEST
 
+#include <errno.h>
+#include <_PDCLIB_glue.h>
+
+extern struct _PDCLIB_file_t * _PDCLIB_filelist;
+
+/* This is a stub implementation of tmpfile
+*/
 struct _PDCLIB_file_t * tmpfile( void )
 {
-    /* TODO: Implement */
+    errno = ENOTSUP;
     return NULL;
 }
 
@@ -20,11 +27,12 @@ struct _PDCLIB_file_t * tmpfile( void )
 
 #ifdef TEST
 #include <_PDCLIB_test.h>
+#include <string.h>
 
-int main()
+int main( void )
 {
-    TESTCASE( NO_TESTDRIVER );
     return TEST_RESULTS;
 }
 
 #endif
+