MLECO-3578: Adding support for Arm Compiler 6.19

Minor update to retarget.c for system function `tmpnam`.

Change-Id: I08cced273e517d00644167f8f5520b09f3c9d10c
Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
diff --git a/source/hal/source/components/stdout/source/retarget.c b/source/hal/source/components/stdout/source/retarget.c
index ac9b282..d06a677 100644
--- a/source/hal/source/components/stdout/source/retarget.c
+++ b/source/hal/source/components/stdout/source/retarget.c
@@ -28,7 +28,6 @@
 #include <rt_misc.h>
 #include <rt_sys.h>
 
-
 /* Standard IO device handles. */
 #define STDIN  0x8001
 #define STDOUT 0x8002
@@ -36,6 +35,12 @@
 
 #define RETARGET(fun) _sys##fun
 
+#if __ARMCLIB_VERSION >= 6190004
+#define TMPNAM_FUNCTION RETARGET(_tmpnam2)
+#else
+#define TMPNAM_FUNCTION RETARGET(_tmpnam)
+#endif
+
 #else
 /* GNU compiler re-targeting */
 
@@ -48,7 +53,7 @@
 /*
  * Open a file. May return -1 if the file failed to open.
  */
-extern FILEHANDLE _open(const char * /*name*/, int /*openmode*/);
+extern FILEHANDLE _open(const char* /*name*/, int /*openmode*/);
 
 /* Standard IO device handles. */
 #define STDIN  0x00
@@ -57,6 +62,8 @@
 
 #define RETARGET(fun) fun
 
+#define TMPNAM_FUNCTION RETARGET(_tmpnam)
+
 #endif
 
 /* Standard IO device name defines. */
@@ -66,16 +73,18 @@
 
 __attribute__((noreturn)) static void UartEndSimulation(int code)
 {
-    UartPutc((char) 0x4);  // End of simulation
-    UartPutc((char) code); // Exit code
-    while(1);
+    UartPutc((char)0x4);  // End of simulation
+    UartPutc((char)code); // Exit code
+    while (1)
+        ;
 }
 
-void _ttywrch(int ch) {
+void _ttywrch(int ch)
+{
     (void)fputc(ch, stdout);
 }
 
-FILEHANDLE RETARGET(_open)(const char *name, int openmode)
+FILEHANDLE RETARGET(_open)(const char* name, int openmode)
 {
     (void)(openmode);
 
@@ -94,7 +103,7 @@
     return -1;
 }
 
-int RETARGET(_write)(FILEHANDLE fh, const unsigned char *buf, unsigned int len, int mode)
+int RETARGET(_write)(FILEHANDLE fh, const unsigned char* buf, unsigned int len, int mode)
 {
     (void)(mode);
 
@@ -117,7 +126,7 @@
     }
 }
 
-int RETARGET(_read)(FILEHANDLE fh, unsigned char *buf, unsigned int len, int mode)
+int RETARGET(_read)(FILEHANDLE fh, unsigned char* buf, unsigned int len, int mode)
 {
     (void)(mode);
 
@@ -186,7 +195,7 @@
     return -1;
 }
 
-int RETARGET(_tmpnam)(char *name, int sig, unsigned int maxlen)
+int TMPNAM_FUNCTION(char* name, int sig, unsigned int maxlen)
 {
     (void)(name);
     (void)(sig);
@@ -195,7 +204,7 @@
     return 1;
 }
 
-char *RETARGET(_command_string)(char *cmd, int len)
+char* RETARGET(_command_string)(char* cmd, int len)
 {
     (void)(len);
 
@@ -205,17 +214,18 @@
 void RETARGET(_exit)(int return_code)
 {
     UartEndSimulation(return_code);
-    while(1);
+    while (1)
+        ;
 }
 
-int system(const char *cmd)
+int system(const char* cmd)
 {
     (void)(cmd);
 
     return 0;
 }
 
-time_t time(time_t *timer)
+time_t time(time_t* timer)
 {
     time_t current;
 
@@ -235,13 +245,14 @@
     return (clock_t)-1;
 }
 
-int remove(const char *arg) {
+int remove(const char* arg)
+{
     (void)(arg);
 
     return 0;
 }
 
-int rename(const char *oldn, const char *newn)
+int rename(const char* oldn, const char* newn)
 {
     (void)(oldn);
     (void)(newn);
@@ -249,14 +260,14 @@
     return 0;
 }
 
-int fputc(int ch, FILE *f)
+int fputc(int ch, FILE* f)
 {
     (void)(f);
 
     return UartPutc(ch);
 }
 
-int fgetc(FILE *f)
+int fgetc(FILE* f)
 {
     (void)(f);
 
@@ -266,7 +277,7 @@
 #ifndef ferror
 
 /* arm-none-eabi-gcc with newlib uses a define for ferror */
-int ferror(FILE *f)
+int ferror(FILE* f)
 {
     (void)(f);