Ignore:
Timestamp:
Sep 28, 2010, 1:19:10 PM (14 years ago)
Author:
rosiere
Message:

1) compatible gcc 4.4.3
2) Translation file in MORPHEO_PREFIX directory

Location:
trunk/IPs/systemC/Environment/TTY/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/Environment/TTY/src/TTY.cpp

    r82 r144  
    11#include "../include/TTY.h"
     2#include <stdlib.h>
     3#include <stdio.h>
    24
    35namespace environment {
     
    4042                // Childen -> transform in a xtty
    4143                close(0); // s
    42                 dup (canal_output.CanalPipe [0]);
     44                if (dup (canal_output.CanalPipe [0]) == -1)
     45                  {
     46                    std::cerr << "<Tty> Error in dupplicate file descriptor." << std::endl;
     47                    exit (1);
     48                  };
    4349                close(1);
    4450                execlp("xtty","xtty", param->name_tty [i].c_str() ,NULL); // devient un tty
  • trunk/IPs/systemC/Environment/TTY/src/TTY_write.cpp

    r117 r144  
    11#include "../include/TTY.h"
     2#include <stdio.h>
    23
    34namespace environment {
     
    1011
    1112    if (param->with_xtty == true)
    12       ::write (xtty[num_tty].pipe_output, &data, 1);
     13      {
     14        if (::write (xtty[num_tty].pipe_output, &data, 1) == -1)
     15          std::cerr << "<TTY::write> write error.\n" << std::endl;
     16      }
    1317   
    1418    fputc (data, xtty[num_tty].log_file);
Note: See TracChangeset for help on using the changeset viewer.