summaryrefslogtreecommitdiff
path: root/security/botan/files/patch-pipe_io.cpp
blob: 25c4bd7ce15e90b55bf0b213b86ca8ce15a77bf5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--- src/pipe_io.cpp.orig	Fri May 10 10:10:27 2002
+++ src/pipe_io.cpp	Fri May 10 10:10:57 2002
@@ -33,12 +33,12 @@
    {
    static const u32bit BUFFERSIZE = DEFAULT_BUFFERSIZE;
    SecureBuffer<byte, BUFFERSIZE> buffer;
-   while(!std::ferror(stream) && pipe.remaining())
+   while(!ferror(stream) && pipe.remaining())
       {
       u32bit got = pipe.read(buffer, BUFFERSIZE);
-      std::fwrite(buffer, 1, got, stream);
+      fwrite(buffer, 1, got, stream);
       }
-   if(std::ferror(stream))
+   if(ferror(stream))
       throw Stream_IO_Error("Pipe output operator (stdio) has failed");
    return stream;
    }
@@ -67,12 +67,12 @@
    {
    static const u32bit BUFFERSIZE = DEFAULT_BUFFERSIZE;
    SecureBuffer<byte, BUFFERSIZE> buffer;
-   while(!std::ferror(stream) && !std::feof(stream))
+   while(!ferror(stream) && !feof(stream))
       {
-      u32bit got = std::fread(buffer, 1, BUFFERSIZE, stream);
+      u32bit got = fread(buffer, 1, BUFFERSIZE, stream);
       pipe.write(buffer, got);
       }
-   if(std::ferror(stream))
+   if(ferror(stream))
       throw Stream_IO_Error("Pipe input operator (stdio) has failed");
    return stream;
    }