Welcome to my site
 
Study-Related
Telematik
INM
BS1
Java-Applets
Books
Private
Curriculum Vitae
Photo-Gallery
Guestbook
Search Engines
What's New?
Contact Me
You are here:   HOME  >  Study-Related  >  BS1  >  Miscellaneous

BS1 - Allerlei

  • Posting bez. STL

    FROM: Werner Trobin
    SUBJECT: Nachos und die STL

    Hi!
    
    Auf Anregung meines Tutors auch an die NG:
    
    Es gibt eine einfache Möglichkeit die STL in Nachos verwenden zu könen,
    ohne Nachos Code ändern zu müssen:
    
    Im Makefile.common "-fno-exceptions" zu den CFLAGS hinzufügen und es
    funktioniert, da die richtigen Deklarationen für atoi() und Co. verwendet
    werden.
    
    Meine Makefile.common CFLAGS sehen so aus:
    CFLAGS = -g -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic
    -ansi -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wshadow
    -fno-builtin -fno-exceptions -fno-check-new -fwritable-strings $(INCPATH)
    $(DEFINES) $(HOST) -DCHANGED
    
    Ciao,
    Werner
    
    P.S. Dieser Patch ist zwar nicht unbedingt nötig, aber es ist nicht nett 
    einen void* zu löschen (gcc macht in diesem Fall trotzdem alles richtig):
    (interrupt.cc ist im Verzeichnis nachos/machine)
    
    --- interrupt.cc        12 Oct 2002 16:26:55 -0000      1.1
    +++ interrupt.cc        16 Oct 2002 13:15:23 -0000      1.2
    @@ -74,7 +74,7 @@ Interrupt::Interrupt()
     Interrupt::~Interrupt()
     {
         while (!pending->IsEmpty())
    -       delete pending->Remove();
    +       delete ( PendingInterrupt* )pending->Remove();
         delete pending;
     }