Use headers defined in the C[++] standards:
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 3 Nov 2003 21:42:40 +0000 (21:42 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Mon, 3 Nov 2003 21:42:40 +0000 (21:42 +0000)
* sim/ucsim/gui.src/serio.src/fileio.cc
* sim/ucsim/gui.src/serio.src/frontend.cc
* sim/ucsim/gui.src/serio.src/main.cc
* sim/ucsim/gui.src/serio.src/posix_signal.cc
* support/Util/NewAlloc.c
* as/hc08/lklibr.c
* as/mcs51/lklibr.c
* as/z80/aslist.c
* as/z80/assym.c

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2989 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
as/hc08/lklibr.c
as/mcs51/lklibr.c
as/z80/aslist.c
as/z80/assym.c
sim/ucsim/gui.src/serio.src/fileio.cc
sim/ucsim/gui.src/serio.src/frontend.cc
sim/ucsim/gui.src/serio.src/main.cc
sim/ucsim/gui.src/serio.src/posix_signal.cc
support/Util/NewAlloc.c

index ce81f2f07acca02c47edea0f8584db8f0ed46c85..c2fd9c5e217f9f11444d4f97809d55d2f26904ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2003-11-03 Bernhard Held <bernhard@bernhardheld.de>
+
+       Use headers defined in the C[++] standards:
+       * sim/ucsim/gui.src/serio.src/fileio.cc
+       * sim/ucsim/gui.src/serio.src/frontend.cc
+       * sim/ucsim/gui.src/serio.src/main.cc
+       * sim/ucsim/gui.src/serio.src/posix_signal.cc
+       * support/Util/NewAlloc.c
+       * as/hc08/lklibr.c
+       * as/mcs51/lklibr.c
+       * as/z80/aslist.c
+       * as/z80/assym.c
+
 2003-11-03  Jesus Calvino-Fraga <jesusc@ece.ubc.ca>
 
        * Added MSVC projects for hc08 assembler and linker:
index 8ca450486b0fa8d4d2bc36f259e2e10fd4ac72e7..3982e03e3f88795b9feb38e0045d3151b5725023 100644 (file)
@@ -21,7 +21,7 @@
 #if defined(__APPLE__) && defined(__MACH__)
 #include <sys/types.h>
 #include <sys/malloc.h>
-#else
+#elseif !defined(__FreeBSD__)
 #include <malloc.h>
 #endif
 #include <stdio.h>
index 9f3df0d91a88d9c1e898bdde46a71da2b958b452..808dfc64c4682b51366ccb77d10fa43ed492f90f 100644 (file)
@@ -21,7 +21,7 @@
 #if defined(__APPLE__) && defined(__MACH__)
 #include <sys/types.h>
 #include <sys/malloc.h>
-#else
+#elseif !defined(__FreeBSD__)
 #include <malloc.h>
 #endif
 #include <stdio.h>
index e5344899bb1e25136cd79b5e87fb6ba5cfe41e65..3a7d0a7f21abd8da4fbd3ef81bb4d7956e2fda01 100644 (file)
@@ -16,6 +16,7 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#include <stdlib.h>
 #if defined(__APPLE__) && defined(__MACH__)
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -23,6 +24,7 @@
 #include <malloc.h>
 #endif
 
+
 #include "asm.h"
 
 /*)Module      aslist.c
index db88a08afbd0def5d614c29fe381662a1649988b..dadce441f877dc1f2c63538fbbd4f8355910222f 100644 (file)
@@ -12,6 +12,7 @@
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
+#include <stdlib.h>
 #if defined(__APPLE__) && defined(__MACH__)
 #include <sys/types.h>
 #include <sys/malloc.h>
index 8c653cfd78ca5d7953996581d174653c277b8d8b..5d5924dc33737d00bf3887aa876ce7400a2f803b 100644 (file)
@@ -3,7 +3,7 @@
  * fileio.cc - file input and output                                          *
  ******************************************************************************/
 #include <sys/types.h>
-#include <iostream.h>
+#include <iostream>
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -18,28 +18,28 @@ FileIO::FileIO()
        // make the input fifo
        if(mkfifo(DEF_INFILE, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) == -1) {
                if(errno != EEXIST) {
-                       cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
+                       std::cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
                        exit(-1);
                }
        }
 
        // the input fifo - non blocking
        if ((fdin = open(DEF_INFILE, O_RDONLY|O_NONBLOCK)) == -1) {
-               cerr << "open(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
+               std::cerr << "open(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
                exit(-1);
        }
 
        // make the output fifo
        if(mkfifo(DEF_OUTFILE, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) == -1) {
                if(errno != EEXIST) {
-                       cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
+                       std::cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
                        exit(-1);
                }
        }
 
        // the output fifo
        if ((fdout = open(DEF_OUTFILE, O_RDWR|O_NONBLOCK)) == -1) {
-               cerr << "open(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
+               std::cerr << "open(): Error number " << errno << " occourred: " << strerror(errno) << "\n";
                exit(-1);
        }
 }
@@ -49,28 +49,28 @@ FileIO::FileIO(char *infile, char *outfile)
        // make the input fifo
        if(mkfifo(infile, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) == -1) {
                if(errno != EEXIST) {
-                       cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno);
+                       std::cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno);
                        exit(-1);
                }
        }
 
        // the input fifo - non blocking
        if ((fdin = open(infile, O_RDONLY|O_NONBLOCK)) == -1) {
-               cerr << "open(): Error number " << errno << " occourred: " << strerror(errno);
+               std::cerr << "open(): Error number " << errno << " occourred: " << strerror(errno);
                exit(-1);
        }
 
        // make the output fifo
        if(mkfifo(outfile, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) == -1) {
                if(errno != EEXIST) {
-                       cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno);
+                       std::cerr << "mkfifo(): Error number " << errno << " occourred: " << strerror(errno);
                        exit(-1);
                }
        }
 
        // the output fifo
        if ((fdout = open(outfile, O_RDWR|O_NONBLOCK)) == -1) {
-               cerr << "open(): Error number " << errno << " occourred: " << strerror(errno);
+               std::cerr << "open(): Error number " << errno << " occourred: " << strerror(errno);
                exit(-1);
        }
 }
@@ -88,7 +88,7 @@ int FileIO::SendByte(char b)
 
        if((ret = write(fdout, &b, 1)) != 1)
        {
-               cerr << "write(): Error number " << errno << " occourred: " << strerror(errno);
+               std::cerr << "write(): Error number " << errno << " occourred: " << strerror(errno);
                exit(-1);
        }
 
@@ -104,7 +104,7 @@ int FileIO::RecvByte(char *b)
 
        if((ret == -1) && (errno != EAGAIN))
        {
-               cerr << "read(): Error number " << errno << " occourred: " << strerror(errno);
+               std::cerr << "read(): Error number " << errno << " occourred: " << strerror(errno);
                exit(-1);
        }
 
@@ -118,7 +118,7 @@ int FileIO::SendStr(char *str)
 
        if((ret = write(fdout, str, strlen(str))) != (int)strlen(str))
        {
-               cerr << "write(): Error number " << errno << " occourred: " << strerror(errno);
+               std::cerr << "write(): Error number " << errno << " occourred: " << strerror(errno);
                exit(-1);
        }
 
@@ -135,7 +135,7 @@ int FileIO::RecvStr(char *str)
 
        if((ret == -1) && (errno != EAGAIN))
        {
-               cerr << "read(): Error number " << errno << " occourred: " << strerror(errno);
+               std::cerr << "read(): Error number " << errno << " occourred: " << strerror(errno);
                exit(-1);
        }
 
index e0cf78d9892874dae3b7e0db94bcd0a1beffd62b..263787a64345357e67f14ea26aaede910b8d9509 100644 (file)
@@ -3,7 +3,7 @@
  * frontend.cc - the ncurses frontend                                         *
  ******************************************************************************/
 #include <sys/types.h>
-#include <iostream.h>
+#include <iostream>
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 5ce361226e0afbdc4b52470e6a2044d4920562eb..32e076f878351d33f4829ceba6bd9a15bcf5870c 100644 (file)
@@ -3,7 +3,7 @@
  * main.cc - the main stuff                                                   *
  ******************************************************************************/
 #include <sys/types.h>
-#include <iostream.h>
+#include <iostream>
 #include <stdlib.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -30,11 +30,11 @@ void HandleSig(int info)
 // usage
 void PrintUsage(char *progname)
 {
-cout << "Usage: " << progname << " [-i <filename>] [-o <filename>] [-h]\n";
-cout << "-i <filename>\t<filename> is the pipe to the controllers' serial input\n";
-cout << "-o <filename>\t<filename> is the pipe to the controllers' serial output\n";
-cout << "-h\t\tshow the help\n";
-cout << "\nTim Hurman - t.hurman@virgin.net\n";
+std::cout << "Usage: " << progname << " [-i <filename>] [-o <filename>] [-h]\n";
+std::cout << "-i <filename>\t<filename> is the pipe to the controllers' serial input\n";
+std::cout << "-o <filename>\t<filename> is the pipe to the controllers' serial output\n";
+std::cout << "-h\t\tshow the help\n";
+std::cout << "\nTim Hurman - t.hurman@virgin.net\n";
 exit(0);
 }
 
@@ -62,7 +62,7 @@ int main(int argc, char **argv)
                errflg++;
                break;
        default:
-               cerr << "Invalid or unknown switch\n";
+               std::cerr << "Invalid or unknown switch\n";
                errflg++;
                break;
        }
@@ -88,7 +88,7 @@ int main(int argc, char **argv)
 
                if(string[0] != 0)
                        fobj->SendByte(string[0]);
-               
+
                if(fobj->RecvStr(string) > 0)
                        view->AddStrOutWin(string);
 
index f9baf936dc3388db38fb6a5b7639b787022e886b..bd9cfc4ddb52f94f06d558e0c7c5f9601cf4edbf 100644 (file)
@@ -11,7 +11,7 @@
  */
 
 #include <sys/types.h>
-#include <iostream.h>
+#include <iostream>
 #include <sys/wait.h>   /* header for waitpid() and various macros */
 #include <signal.h>     /* header for signal functions */
 #include <stdlib.h>
@@ -51,7 +51,7 @@ int SigHandler::SetSignal(int SIGNAL, SIG_PF ACTION)
        /* set the signal handler */
        if(sigaction(SIGNAL, &act, NULL) < 0)
        {
-               cerr << "sigaction(): " << strerror(errno) << "\n";
+               std::cerr << "sigaction(): " << strerror(errno) << "\n";
                exit(-1);
        }
 
@@ -74,7 +74,7 @@ int SigHandler::BlockSignal(int SIGNAL)
        /* block it */
        if(sigprocmask(SIG_BLOCK, &set, NULL) < 0)
        {
-               cerr << "sigprocmask(): " << strerror(errno) << "\n";
+               std::cerr << "sigprocmask(): " << strerror(errno) << "\n";
                exit(-1);
        }
 
@@ -97,7 +97,7 @@ int SigHandler::UnBlockSignal(int SIGNAL)
        /* block it */
        if(sigprocmask(SIG_UNBLOCK, &set, NULL) < 0)
        {
-               cerr << "sigprocmask(): " << strerror(errno) << "\n";
+               std::cerr << "sigprocmask(): " << strerror(errno) << "\n";
                exit(-1);
        }
 
index ff163999dbfa757ecdbf0449ec20c14fd357f032..264311bb1e6af9f599777aee44d4d6f89234c9f8 100644 (file)
@@ -30,7 +30,7 @@ functions.
 #include <stdio.h>
 #if defined(__APPLE__) && defined(__MACH__)
 #include <sys/malloc.h>
-#else
+#elseif !defined(__FreeBSD__)
 #include <malloc.h>
 #endif
 #include <stdlib.h>