Hi guys,

Here is the patch for stdio.h file.

Thanks
Himanshu
From 2fb179b743f7527f5d922c0fd42b8e5306326cd9 Mon Sep 17 00:00:00 2001
From: Himanshu40 <himanshuwindows...@gmail.com>
Date: Wed, 5 Dec 2018 15:45:23 +0530
Subject: [PATCH] psxhdrs : add POSIX API Signature Compliance Tests for
 stdio.h File (GCI 2018)

---
 testsuites/psxtests/Makefile.am               | 68 ++++++++++++++++++-
 testsuites/psxtests/psxhdrs/stdio/clearerr.c  | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/ctermid.c   | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/dprintf.c   | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fclose.c    | 38 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fdopen.c    | 38 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/feof.c      | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/ferror.c    | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fflush.c    | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fgetc.c     | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fgetpos.c   | 41 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fgets.c     | 43 ++++++++++++
 testsuites/psxtests/psxhdrs/stdio/fileno.c    | 42 ++++++++++++
 testsuites/psxtests/psxhdrs/stdio/flockfile.c | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fmemopen.c  | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fopen.c     | 37 ++++++++++
 testsuites/psxtests/psxhdrs/stdio/fprintf.c   | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fputc.c     | 41 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fputs.c     | 41 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fread.c     | 44 ++++++++++++
 testsuites/psxtests/psxhdrs/stdio/freopen.c   | 41 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fscanf.c    | 43 ++++++++++++
 testsuites/psxtests/psxhdrs/stdio/fseek.c     | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fseeko.c    | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fsetpos.c   | 41 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/ftell.c     | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/ftello.c    | 40 +++++++++++
 .../psxtests/psxhdrs/stdio/ftrylockfile.c     | 40 +++++++++++
 .../psxtests/psxhdrs/stdio/funlockfile.c      | 38 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/fwrite.c    | 41 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/getc.c      | 40 +++++++++++
 .../psxtests/psxhdrs/stdio/getc_unlocked.c    | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/getchar.c   | 40 +++++++++++
 .../psxtests/psxhdrs/stdio/getchar_unlocked.c | 37 ++++++++++
 testsuites/psxtests/psxhdrs/stdio/gets.c      | 38 +++++++++++
 .../psxtests/psxhdrs/stdio/open_memstream.c   | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/perror.c    | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/printf.c    | 37 ++++++++++
 testsuites/psxtests/psxhdrs/stdio/putc.c      | 40 +++++++++++
 .../psxtests/psxhdrs/stdio/putc_unlocked.c    | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/putchar.c   | 37 ++++++++++
 .../psxtests/psxhdrs/stdio/putchar_unlocked.c | 37 ++++++++++
 testsuites/psxtests/psxhdrs/stdio/puts.c      | 37 ++++++++++
 testsuites/psxtests/psxhdrs/stdio/remove.c    | 37 ++++++++++
 testsuites/psxtests/psxhdrs/stdio/rename.c    | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/rewind.c    | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/scanf.c     | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/setbuf.c    | 43 ++++++++++++
 testsuites/psxtests/psxhdrs/stdio/setvbuf.c   | 43 ++++++++++++
 testsuites/psxtests/psxhdrs/stdio/snprintf.c  | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/sprintf.c   | 43 ++++++++++++
 testsuites/psxtests/psxhdrs/stdio/sscanf.c    | 41 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/stderr.c    | 37 ++++++++++
 testsuites/psxtests/psxhdrs/stdio/stdin.c     | 37 ++++++++++
 testsuites/psxtests/psxhdrs/stdio/stdout.c    | 37 ++++++++++
 testsuites/psxtests/psxhdrs/stdio/tempnam.c   | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/tmpfile.c   | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/tmpnam.c    | 37 ++++++++++
 testsuites/psxtests/psxhdrs/stdio/ungetc.c    | 41 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/vdprintf.c  | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/vfprintf.c  | 42 ++++++++++++
 testsuites/psxtests/psxhdrs/stdio/vfscanf.c   | 42 ++++++++++++
 testsuites/psxtests/psxhdrs/stdio/vprintf.c   | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/vscanf.c    | 39 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/vsnprintf.c | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/vsprintf.c  | 40 +++++++++++
 testsuites/psxtests/psxhdrs/stdio/vsscanf.c   | 40 +++++++++++
 67 files changed, 2686 insertions(+), 1 deletion(-)
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/clearerr.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/ctermid.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/dprintf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fclose.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fdopen.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/feof.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/ferror.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fflush.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fgetc.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fgetpos.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fgets.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fileno.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/flockfile.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fmemopen.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fopen.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fprintf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fputc.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fputs.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fread.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/freopen.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fscanf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fseek.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fseeko.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fsetpos.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/ftell.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/ftello.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/ftrylockfile.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/funlockfile.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/fwrite.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/getc.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/getc_unlocked.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/getchar.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/getchar_unlocked.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/gets.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/open_memstream.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/perror.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/printf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/putc.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/putc_unlocked.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/putchar.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/putchar_unlocked.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/puts.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/remove.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/rename.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/rewind.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/scanf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/setbuf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/setvbuf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/snprintf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/sprintf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/sscanf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/stderr.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/stdin.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/stdout.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/tempnam.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/tmpfile.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/tmpnam.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/ungetc.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/vdprintf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/vfprintf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/vfscanf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/vprintf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/vscanf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/vsnprintf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/vsprintf.c
 create mode 100644 testsuites/psxtests/psxhdrs/stdio/vsscanf.c

diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index c9241af511..67ce8f376a 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -1147,7 +1147,73 @@ lib_a_SOURCES = psxhdrs/devctl/posix_devctl.c \
 	psxhdrs/sys/time/utimes.c \
 	psxhdrs/sys/time/setitimer.c \
 	psxhdrs/sys/time/getitimer.c \
-	psxhdrs/sys/time/gettimeofday.c
+	psxhdrs/sys/time/gettimeofday.c \
+	psxhdrs/stdio/clearerr.c \
+	psxhdrs/stdio/ctermid.c \
+	psxhdrs/stdio/dprintf.c \
+	psxhdrs/stdio/fclose.c \
+	psxhdrs/stdio/fdopen.c \
+	psxhdrs/stdio/feof.c \
+	psxhdrs/stdio/ferror.c \
+	psxhdrs/stdio/fflush.c \
+	psxhdrs/stdio/fgetc.c \
+	psxhdrs/stdio/fgetpos.c \
+	psxhdrs/stdio/fgets.c \
+	psxhdrs/stdio/fileno.c \
+	psxhdrs/stdio/flockfile.c \
+	psxhdrs/stdio/fmemopen.c \
+	psxhdrs/stdio/fopen.c \
+	psxhdrs/stdio/fprintf.c \
+	psxhdrs/stdio/fputc.c \
+	psxhdrs/stdio/fputs.c \
+	psxhdrs/stdio/fread.c \
+	psxhdrs/stdio/freopen.c \
+	psxhdrs/stdio/fscanf.c \
+	psxhdrs/stdio/fseek.c \
+	psxhdrs/stdio/fseeko.c \
+	psxhdrs/stdio/fsetpos.c \
+	psxhdrs/stdio/ftell.c \
+	psxhdrs/stdio/ftello.c \
+	psxhdrs/stdio/ftrylockfile.c \
+	psxhdrs/stdio/funlockfile.c \
+	psxhdrs/stdio/fwrite.c \
+	psxhdrs/stdio/getc.c \
+	psxhdrs/stdio/getc_unlocked.c \
+	psxhdrs/stdio/getchar.c \
+	psxhdrs/stdio/getchar_unlocked.c \
+	psxhdrs/stdio/gets.c \
+	psxhdrs/stdio/open_memstream.c \
+	psxhdrs/stdio/perror.c \
+	psxhdrs/stdio/printf.c \
+	psxhdrs/stdio/putc.c \
+	psxhdrs/stdio/putc_unlocked.c \
+	psxhdrs/stdio/putchar.c \
+	psxhdrs/stdio/putchar_unlocked.c \
+	psxhdrs/stdio/puts.c \
+	psxhdrs/stdio/remove.c \
+	psxhdrs/stdio/rename.c \
+	psxhdrs/stdio/rewind.c \
+	psxhdrs/stdio/scanf.c \
+	psxhdrs/stdio/setbuf.c \
+	psxhdrs/stdio/setvbuf.c \
+	psxhdrs/stdio/snprintf.c \
+	psxhdrs/stdio/sprintf.c \
+	psxhdrs/stdio/sscanf.c \
+	psxhdrs/stdio/stderr.c \
+	psxhdrs/stdio/stdin.c \
+	psxhdrs/stdio/stdout.c \
+	psxhdrs/stdio/tempnam.c \
+	psxhdrs/stdio/tmpfile.c \
+	psxhdrs/stdio/tmpnam.c \
+	psxhdrs/stdio/ungetc.c \
+	psxhdrs/stdio/vdprintf.c \
+	psxhdrs/stdio/vfprintf.c \
+	psxhdrs/stdio/vfscanf.c \
+	psxhdrs/stdio/vprintf.c \
+	psxhdrs/stdio/vscanf.c \
+	psxhdrs/stdio/vsnprintf.c \
+	psxhdrs/stdio/vsprintf.c \
+	psxhdrs/stdio/vsscanf.c
 
 ## Not supported by RTEMS, but POSIX API Compliance tests exist.
 ## lib_a_SOURCES += psxhdrs/ulimit/ulimit.c
diff --git a/testsuites/psxtests/psxhdrs/stdio/clearerr.c b/testsuites/psxtests/psxhdrs/stdio/clearerr.c
new file mode 100644
index 0000000000..5ed0e72f69
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/clearerr.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief clearerr() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+
+  stream = fopen( "mylib/myfile", "r" );
+  clearerr( stream );
+  fclose( stream );
+
+  return ( stream != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/ctermid.c b/testsuites/psxtests/psxhdrs/stdio/ctermid.c
new file mode 100644
index 0000000000..3dc68677e7
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/ctermid.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief ctermid() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  char termid[100];
+  char *ptr;
+
+  ptr = ctermid( termid );
+  (void) termid;
+
+  return ( ptr != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/dprintf.c b/testsuites/psxtests/psxhdrs/stdio/dprintf.c
new file mode 100644
index 0000000000..522ee24a20
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/dprintf.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief dprintf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  int fd = 12;
+  char *format = "Hello World";
+  int result;
+
+  result = dprintf( fd, format );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fclose.c b/testsuites/psxtests/psxhdrs/stdio/fclose.c
new file mode 100644
index 0000000000..205de9adac
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fclose.c
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief fclose() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+
+  stream = fopen( "mylib/myfile", "r" );
+  fclose( stream );
+
+  return ( stream != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fdopen.c b/testsuites/psxtests/psxhdrs/stdio/fdopen.c
new file mode 100644
index 0000000000..cb23f1aaf8
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fdopen.c
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief fdopen() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *fp;
+  int fh = 2;
+
+  fp = fdopen( fh, "r");
+
+  return ( fp != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/feof.c b/testsuites/psxtests/psxhdrs/stdio/feof.c
new file mode 100644
index 0000000000..c974141f33
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/feof.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief feof() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "mylib/myfile", "r" );
+  result = feof( stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/ferror.c b/testsuites/psxtests/psxhdrs/stdio/ferror.c
new file mode 100644
index 0000000000..1190935ae5
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/ferror.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief ferror() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "mylib/myfile", "w" );
+  result = ferror( stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fflush.c b/testsuites/psxtests/psxhdrs/stdio/fflush.c
new file mode 100644
index 0000000000..362bfb15ef
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fflush.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief fflush() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fflush( stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fgetc.c b/testsuites/psxtests/psxhdrs/stdio/fgetc.c
new file mode 100644
index 0000000000..ddeae96748
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fgetc.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief fgetc() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fgetc( stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fgetpos.c b/testsuites/psxtests/psxhdrs/stdio/fgetpos.c
new file mode 100644
index 0000000000..d7645d502e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fgetpos.c
@@ -0,0 +1,41 @@
+/**
+ *  @file
+ *  @brief fgetpos() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  fpos_t pos;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fgetpos( stream, &pos );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fgets.c b/testsuites/psxtests/psxhdrs/stdio/fgets.c
new file mode 100644
index 0000000000..e82613dc2d
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fgets.c
@@ -0,0 +1,43 @@
+/**
+ *  @file
+ *  @brief fgets() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+#define  MAX_LEN  100
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char line[MAX_LEN];
+  char *result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fgets( line, MAX_LEN, stream );
+  fclose( stream );
+
+  return ( result != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fileno.c b/testsuites/psxtests/psxhdrs/stdio/fileno.c
new file mode 100644
index 0000000000..16f81823b4
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fileno.c
@@ -0,0 +1,42 @@
+/**
+ *  @file
+ *  @brief fileno() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char hfs_file[]="./hfs_file";
+  int result;
+
+  stream = fopen( hfs_file, "w" );
+  (void) hfs_file;
+  result = fileno( stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/flockfile.c b/testsuites/psxtests/psxhdrs/stdio/flockfile.c
new file mode 100644
index 0000000000..3c4b4d4de9
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/flockfile.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief flockfile() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+
+  stream = fopen( "myfile.dat", "w" );
+  flockfile( stream );
+  fclose( stream );
+
+  return ( stream != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fmemopen.c b/testsuites/psxtests/psxhdrs/stdio/fmemopen.c
new file mode 100644
index 0000000000..eb0ab42f13
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fmemopen.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief fmemopen() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <string.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char buffer[] = "foobar";
+
+  stream = fmemopen( buffer, strlen( buffer ), "r" );
+  (void) buffer;
+
+  return ( stream != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fopen.c b/testsuites/psxtests/psxhdrs/stdio/fopen.c
new file mode 100644
index 0000000000..7b7adc6655
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fopen.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief fopen() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+
+  stream = fopen( "myfile.dat", "w" );
+
+  return ( stream != NULL);
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fprintf.c b/testsuites/psxtests/psxhdrs/stdio/fprintf.c
new file mode 100644
index 0000000000..b2fe050e96
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fprintf.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief fprintf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fprintf( stream, "*" );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fputc.c b/testsuites/psxtests/psxhdrs/stdio/fputc.c
new file mode 100644
index 0000000000..935fee46cc
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fputc.c
@@ -0,0 +1,41 @@
+/**
+ *  @file
+ *  @brief fputc() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char buffer[] = "Hello world";
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fputc( buffer[3], stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fputs.c b/testsuites/psxtests/psxhdrs/stdio/fputs.c
new file mode 100644
index 0000000000..ea091972bf
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fputs.c
@@ -0,0 +1,41 @@
+/**
+ *  @file
+ *  @brief fputs() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char buffer[] = "Hello World";
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fputs( buffer, stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fread.c b/testsuites/psxtests/psxhdrs/stdio/fread.c
new file mode 100644
index 0000000000..27188d0e5b
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fread.c
@@ -0,0 +1,44 @@
+/**
+ *  @file
+ *  @brief fread() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+#define NUM_ALPHA  26
+
+int test( void )
+{
+  FILE *stream;
+  int bytes_read;
+  char buffer[NUM_ALPHA + 1];
+
+  buffer[NUM_ALPHA] = '\0';
+  stream = fopen( "myfile.dat", "w" );
+  bytes_read = fread( buffer, sizeof( char ), NUM_ALPHA, stream );
+  fclose( stream );
+
+  return bytes_read;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/freopen.c b/testsuites/psxtests/psxhdrs/stdio/freopen.c
new file mode 100644
index 0000000000..55075a59cf
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/freopen.c
@@ -0,0 +1,41 @@
+/**
+ *  @file
+ *  @brief freopen() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream, *stream1, *stream2;
+
+  stream = fopen( "myfile.dat", "w" );
+  stream1 = stream;
+  stream2 = freopen("", "w+", stream1);
+  fclose( stream );
+  fclose( stream1 );
+
+  return ( stream2 != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fscanf.c b/testsuites/psxtests/psxhdrs/stdio/fscanf.c
new file mode 100644
index 0000000000..b4d03f7c21
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fscanf.c
@@ -0,0 +1,43 @@
+/**
+ *  @file
+ *  @brief fscanf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+#define  MAX_LEN  80
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char s[MAX_LEN + 1];
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fscanf( stream, "%s", &s[0] );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fseek.c b/testsuites/psxtests/psxhdrs/stdio/fseek.c
new file mode 100644
index 0000000000..be1925ed3f
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fseek.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief fseek() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fseek( stream, 0L, SEEK_SET );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fseeko.c b/testsuites/psxtests/psxhdrs/stdio/fseeko.c
new file mode 100644
index 0000000000..bc9b92db65
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fseeko.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief fseeko() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fseeko( stream, 0LL, SEEK_SET );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fsetpos.c b/testsuites/psxtests/psxhdrs/stdio/fsetpos.c
new file mode 100644
index 0000000000..931c6435e9
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fsetpos.c
@@ -0,0 +1,41 @@
+/**
+ *  @file
+ *  @brief fsetpos() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  fpos_t pos;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fsetpos( stream, &pos );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/ftell.c b/testsuites/psxtests/psxhdrs/stdio/ftell.c
new file mode 100644
index 0000000000..19628da391
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/ftell.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief ftell() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = ftell( stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/ftello.c b/testsuites/psxtests/psxhdrs/stdio/ftello.c
new file mode 100644
index 0000000000..efed4b9b39
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/ftello.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief ftello() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  off_t result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = ftello( stream );
+  fclose( stream );
+
+  return ( (int)result );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/ftrylockfile.c b/testsuites/psxtests/psxhdrs/stdio/ftrylockfile.c
new file mode 100644
index 0000000000..06c669eddf
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/ftrylockfile.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief ftrylockfile() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = ftrylockfile( stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/funlockfile.c b/testsuites/psxtests/psxhdrs/stdio/funlockfile.c
new file mode 100644
index 0000000000..a3d0805af8
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/funlockfile.c
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief funlockfile() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+
+  stream = fopen( "myfile.dat", "w" );
+  funlockfile( stream );
+
+  return ( stream != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/fwrite.c b/testsuites/psxtests/psxhdrs/stdio/fwrite.c
new file mode 100644
index 0000000000..e035217615
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/fwrite.c
@@ -0,0 +1,41 @@
+/**
+ *  @file
+ *  @brief fwrite() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  long list[] = {1,2,3,4,5};
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = fwrite( list, sizeof(long), 5, stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/getc.c b/testsuites/psxtests/psxhdrs/stdio/getc.c
new file mode 100644
index 0000000000..f0a5b54434
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/getc.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief getc() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = getc( stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/getc_unlocked.c b/testsuites/psxtests/psxhdrs/stdio/getc_unlocked.c
new file mode 100644
index 0000000000..ec051644dc
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/getc_unlocked.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief getc_unlocked() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = getc_unlocked( stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/getchar.c b/testsuites/psxtests/psxhdrs/stdio/getchar.c
new file mode 100644
index 0000000000..c481a6191b
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/getchar.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief getchar() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = getchar();
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/getchar_unlocked.c b/testsuites/psxtests/psxhdrs/stdio/getchar_unlocked.c
new file mode 100644
index 0000000000..a5d1868b08
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/getchar_unlocked.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief getchar_unlocked() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+
+  result = getchar_unlocked( );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/gets.c b/testsuites/psxtests/psxhdrs/stdio/gets.c
new file mode 100644
index 0000000000..333ff1969a
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/gets.c
@@ -0,0 +1,38 @@
+/**
+ *  @file
+ *  @brief gets() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  char *s = "Hello";
+  char *result;
+
+  result = gets( s );
+
+  return ( result != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/open_memstream.c b/testsuites/psxtests/psxhdrs/stdio/open_memstream.c
new file mode 100644
index 0000000000..eba5613aa8
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/open_memstream.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief open_memstream() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  size_t len;
+  char *buf;
+
+  stream = open_memstream( &buf, &len );
+  fclose( stream );
+
+  return ( stream != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/perror.c b/testsuites/psxtests/psxhdrs/stdio/perror.c
new file mode 100644
index 0000000000..131a55e0ab
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/perror.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief perror() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+
+  stream = fopen( "myfile.dat", "w" );
+  perror("Can't Open data file");
+  fclose( stream );
+
+  return ( stream != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/printf.c b/testsuites/psxtests/psxhdrs/stdio/printf.c
new file mode 100644
index 0000000000..d1f8f3f242
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/printf.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief printf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+
+  result = printf( "Hello World" );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/putc.c b/testsuites/psxtests/psxhdrs/stdio/putc.c
new file mode 100644
index 0000000000..5bfa3a1921
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/putc.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief putc() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = putc( 3, stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/putc_unlocked.c b/testsuites/psxtests/psxhdrs/stdio/putc_unlocked.c
new file mode 100644
index 0000000000..0b1f357ff4
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/putc_unlocked.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief putc_unlocked() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = putc_unlocked( 4, stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/putchar.c b/testsuites/psxtests/psxhdrs/stdio/putchar.c
new file mode 100644
index 0000000000..c8e9116810
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/putchar.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief putchar() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+
+  result = putchar( 4 );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/putchar_unlocked.c b/testsuites/psxtests/psxhdrs/stdio/putchar_unlocked.c
new file mode 100644
index 0000000000..64138f1eed
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/putchar_unlocked.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief putchar_unlocked() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+
+  result = putchar_unlocked( 75 );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/puts.c b/testsuites/psxtests/psxhdrs/stdio/puts.c
new file mode 100644
index 0000000000..5a64165962
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/puts.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief puts() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+
+  result = puts( "Hello" );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/remove.c b/testsuites/psxtests/psxhdrs/stdio/remove.c
new file mode 100644
index 0000000000..3ca3e2fe56
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/remove.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief remove() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+
+  result = remove( "/home/cnd/old_mods" );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/rename.c b/testsuites/psxtests/psxhdrs/stdio/rename.c
new file mode 100644
index 0000000000..85b1d5f546
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/rename.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief rename() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  char *old = "Hello";
+  char *new = "Hosts";
+  int result;
+
+  result = rename( old, new );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/rewind.c b/testsuites/psxtests/psxhdrs/stdio/rewind.c
new file mode 100644
index 0000000000..1bbb42d299
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/rewind.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief rewind() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+
+  stream = fopen( "myfile.dat", "w" );
+  rewind( stream );
+  fclose( stream );
+
+  return ( stream != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/scanf.c b/testsuites/psxtests/psxhdrs/stdio/scanf.c
new file mode 100644
index 0000000000..e158856c08
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/scanf.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief scanf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  char *p;
+  int result;
+
+  result = scanf( "%m[a-z]", &p );
+  free( p );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/setbuf.c b/testsuites/psxtests/psxhdrs/stdio/setbuf.c
new file mode 100644
index 0000000000..fd786618e5
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/setbuf.c
@@ -0,0 +1,43 @@
+/**
+ *  @file
+ *  @brief setbuf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+#define  BUF_SIZE  1024
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char buf[BUFSIZ];
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  setbuf( stream, buf );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/setvbuf.c b/testsuites/psxtests/psxhdrs/stdio/setvbuf.c
new file mode 100644
index 0000000000..437bab9839
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/setvbuf.c
@@ -0,0 +1,43 @@
+/**
+ *  @file
+ *  @brief setvbuf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+#define  BUF_SIZE  1024
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char buf[BUF_SIZE];
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = setvbuf( stream, buf, _IOFBF, sizeof(buf) );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/snprintf.c b/testsuites/psxtests/psxhdrs/stdio/snprintf.c
new file mode 100644
index 0000000000..5b092e863e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/snprintf.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief snprintf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  char *s = "geeksforgeeks";
+  char buffer[50];
+  int result;
+
+  result = snprintf( buffer, 6, "%s\n", s );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/sprintf.c b/testsuites/psxtests/psxhdrs/stdio/sprintf.c
new file mode 100644
index 0000000000..c1832eca92
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/sprintf.c
@@ -0,0 +1,43 @@
+/**
+ *  @file
+ *  @brief sprintf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  char *format = "Sum of %d and %d is %d";
+  char buffer[200];
+  int a, b, c;
+  int result;
+
+  a = 10;
+  b = 20;
+  c = a + b;
+  result = sprintf( buffer, format, a, b, c );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/sscanf.c b/testsuites/psxtests/psxhdrs/stdio/sscanf.c
new file mode 100644
index 0000000000..f01ea7a308
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/sscanf.c
@@ -0,0 +1,41 @@
+/**
+ *  @file
+ *  @brief sscanf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stddef.h>
+
+int test( void );
+
+int test( void )
+{
+  char *string = "ABC Z";
+  wchar_t  ws[81];
+  wchar_t  wc;
+  int result;
+
+  result = sscanf( string, "%ls %lc", ws, &wc );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/stderr.c b/testsuites/psxtests/psxhdrs/stdio/stderr.c
new file mode 100644
index 0000000000..2f5221f456
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/stderr.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief stderr() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+
+  result = fprintf( stderr, "HELP!" );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/stdin.c b/testsuites/psxtests/psxhdrs/stdio/stdin.c
new file mode 100644
index 0000000000..07a840cd72
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/stdin.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief stdin() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  char *result;
+
+  result = fgets( stdin, 256, stdin );
+
+  return ( result != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/stdout.c b/testsuites/psxtests/psxhdrs/stdio/stdout.c
new file mode 100644
index 0000000000..a0a1963791
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/stdout.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief stdout() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  int result;
+
+  result = fputs( "Hello world", stdout );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/tempnam.c b/testsuites/psxtests/psxhdrs/stdio/tempnam.c
new file mode 100644
index 0000000000..2db138c614
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/tempnam.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief tempnam() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  char *directory = "/tmp";
+  char *fileprefix = "file";
+  char *result;
+
+  result = tempnam( directory, fileprefix );
+
+  return ( result != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/tmpfile.c b/testsuites/psxtests/psxhdrs/stdio/tmpfile.c
new file mode 100644
index 0000000000..2a5579db57
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/tmpfile.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief tmpfile() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char tmpstring[ ] = "This string will be written";
+
+  stream = tmpfile( );
+  fclose( stream );
+
+  return ( stream != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/tmpnam.c b/testsuites/psxtests/psxhdrs/stdio/tmpnam.c
new file mode 100644
index 0000000000..036729c5bd
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/tmpnam.c
@@ -0,0 +1,37 @@
+/**
+ *  @file
+ *  @brief tmpnam() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  char *name1;
+
+  name1 = tmpnam( NULL );
+
+  return ( name1 != NULL );
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/ungetc.c b/testsuites/psxtests/psxhdrs/stdio/ungetc.c
new file mode 100644
index 0000000000..8a3338a4f7
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/ungetc.c
@@ -0,0 +1,41 @@
+/**
+ *  @file
+ *  @brief ungetc() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = getc( stream );
+  result = ungetc( result, stream );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/vdprintf.c b/testsuites/psxtests/psxhdrs/stdio/vdprintf.c
new file mode 100644
index 0000000000..ab0009efe5
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/vdprintf.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief vdprintf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+int test( void );
+
+int test( void )
+{
+  char *fmt1 = "%d";
+  int result;
+
+  result = vdprintf( 2, fmt1, NULL );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/vfprintf.c b/testsuites/psxtests/psxhdrs/stdio/vfprintf.c
new file mode 100644
index 0000000000..a121b4a7b7
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/vfprintf.c
@@ -0,0 +1,42 @@
+/**
+ *  @file
+ *  @brief vfprintf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char *fmt1 = " %d %99s ";
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = vfprintf( stream, fmt1, NULL );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/vfscanf.c b/testsuites/psxtests/psxhdrs/stdio/vfscanf.c
new file mode 100644
index 0000000000..b6c47d5ad7
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/vfscanf.c
@@ -0,0 +1,42 @@
+/**
+ *  @file
+ *  @brief vfscanf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+int test( void );
+
+int test( void )
+{
+  FILE *stream;
+  char *fmt1 = " %d %99s ";
+  int result;
+
+  stream = fopen( "myfile.dat", "w" );
+  result = vfscanf( stream, fmt1, NULL );
+  fclose( stream );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/vprintf.c b/testsuites/psxtests/psxhdrs/stdio/vprintf.c
new file mode 100644
index 0000000000..d9bd53e99b
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/vprintf.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief vprintf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+int test( void );
+
+int test( void )
+{
+  char *fmt1 = " %d %99s ";
+  int result;
+
+  result = vprintf( fmt1, NULL );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/vscanf.c b/testsuites/psxtests/psxhdrs/stdio/vscanf.c
new file mode 100644
index 0000000000..579629480c
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/vscanf.c
@@ -0,0 +1,39 @@
+/**
+ *  @file
+ *  @brief vscanf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+int test( void );
+
+int test( void )
+{
+  char *fmt1 = " %d %99s ";
+  int result;
+
+  result = vscanf( fmt1, NULL );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c b/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c
new file mode 100644
index 0000000000..ced459b35e
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/vsnprintf.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief vsnprintf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+int test( void );
+
+int test( void )
+{
+  char *fmt1 = " %d %99s ";
+  char *string = "%d %99s";
+  int result;
+
+  result = vsnprintf( string, 8, fmt1, NULL );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/vsprintf.c b/testsuites/psxtests/psxhdrs/stdio/vsprintf.c
new file mode 100644
index 0000000000..d287f79bec
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/vsprintf.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief vsprintf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+int test( void );
+
+int test( void )
+{
+  char *fmt1 = " %d %99s ";
+  char *string = "Hello world";
+  int result;
+
+  result = vsprintf( string, fmt1, NULL );
+
+  return result;
+}
diff --git a/testsuites/psxtests/psxhdrs/stdio/vsscanf.c b/testsuites/psxtests/psxhdrs/stdio/vsscanf.c
new file mode 100644
index 0000000000..ebe89ce1c0
--- /dev/null
+++ b/testsuites/psxtests/psxhdrs/stdio/vsscanf.c
@@ -0,0 +1,40 @@
+/**
+ *  @file
+ *  @brief vsscanf() API Conformance Test
+ */
+
+/*
+ *  COPYRIGHT (c) 2018.
+ *  Himanshu Sekhar Nayak
+ *
+ *  Permission to use, copy, modify, and/or distribute this software
+ *  for any purpose with or without fee is hereby granted.
+ *
+ *  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ *  WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ *  WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR
+ *  BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
+ *  OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ *  WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ *  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <stdarg.h>
+
+int test( void );
+
+int test( void )
+{
+  char *tokenstring = "15 12 14";
+  char *fmt1 = " %d %99s ";
+  int result;
+
+  result = vsscanf( tokenstring, fmt1, NULL );
+
+  return result;
+}
-- 
2.17.2

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to