Changeset 516


Ignore:
Timestamp:
11/24/05 14:28:08 (7 years ago)
Author:
dlawson
Message:

wrapped stdin and stdout in fileno() when passing to LIBTRACE_FDOPEN

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/format_erf.c

    r515 r516  
    269269                // STDIN 
    270270                libtrace->sourcetype = STDIN; 
    271                 if ((INPUT.file = LIBTRACE_FDOPEN(stdin, "r")) < 0) { 
     271                if ((INPUT.file = LIBTRACE_FDOPEN(fileno(stdin), "r")) < 0) { 
    272272                        perror("libtrace_fdopen:"); 
    273273                        return 0; 
     
    382382        if (!strncmp(libtrace->uridata,"-",1)) { 
    383383                // STDOUT 
    384                 OUTPUT.file = LIBTRACE_FDOPEN(stdout,filemode); 
     384                OUTPUT.file = LIBTRACE_FDOPEN(fileno(stdout),filemode); 
    385385        } 
    386386        else { 
  • trunk/lib/format_wag.c

    r514 r516  
    3030 
    3131#define _GNU_SOURCE 
     32#include "config.h" 
     33#include "common.h" 
    3234#include "libtrace.h" 
    3335#include "libtrace_int.h" 
    3436#include "format_helper.h" 
    3537#include "wag.h" 
    36 #include "config.h" 
    3738 
    3839#ifdef HAVE_INTTYPES_H 
     
    6364#include <stdlib.h> 
    6465 
    65 /* 
    66 #if HAVE_ZLIB 
    67 #  include <zlib.h> 
    68 #  define LIBTRACE_READ gzread 
    69 #  define LIBTRACE_FDOPEN gzdopen 
    70 #  define LIBTRACE_CLOSE gzclose 
    71 #  define LIBTRACE_WRITE gzwrite 
    72 #else 
    73 #  define LIBTRACE_READ read 
    74 #  define LIBTRACE_FDOPEN open 
    75 #  define LIBTRACE_CLOSE close 
    76 #  define LIBTRACE_WRITE write 
    77 #endif 
    78 */ 
    7966#ifdef HAVE_LIMITS_H 
    8067#  include <limits.h> 
     
    146133                // STDIN 
    147134                libtrace->sourcetype = STDIN; 
    148                 INPUT.file = LIBTRACE_FDOPEN(STDIN,"r"); 
     135                INPUT.file = LIBTRACE_FDOPEN(fileno(stdin),"r"); 
    149136 
    150137        } else { 
Note: See TracChangeset for help on using the changeset viewer.