e99a0fb122
shared library linkage in general. On DragonFly and NetBSD build with -Wl,-z,defs to find possible regressions.
40 lines
1.8 KiB
Text
40 lines
1.8 KiB
Text
$NetBSD: patch-aj,v 1.3 2007/02/15 18:26:15 joerg Exp $
|
|
|
|
--- src/ComTerp/comterpserv.c.orig 2006-07-20 20:48:00.000000000 +0000
|
|
+++ src/ComTerp/comterpserv.c
|
|
@@ -161,7 +161,7 @@ char* ComTerpServ::fd_fgets(char* s, int
|
|
fileptr_filebuf fbuf(ifptr, ios_base::in);
|
|
istream in (&fbuf);
|
|
in.get(instr, BUFSIZ, '\n'); // needs to be generalized with <vector.h>
|
|
-#elif __GNUC__>3
|
|
+#elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
|
char instr[BUFSIZ];
|
|
FILE* ifptr = fd==0 ? stdin : server->handler()->rdfptr();
|
|
fileptr_filebuf fbuf(ifptr, ios_base::in);
|
|
@@ -214,7 +214,7 @@ int ComTerpServ::fd_fputs(const char* s,
|
|
#elif (__GNUC__==3 && __GNUC_MINOR__<1)
|
|
FILE* ofptr = fd==0 ? stdout : fdopen(fd, "w");
|
|
fileptr_filebuf fbuf(ofptr, ios_base::out);
|
|
-#elif __GNUC__>3
|
|
+#elif __GNUC__>3 || (__GNUC__==3 && __GNUC_MINOR__ >= 4)
|
|
FILE* ofptr = fd==0 ? stdout : server->handler()->wrfptr();
|
|
fileptr_filebuf fbuf(ofptr, ios_base::out);
|
|
#else
|
|
@@ -335,7 +335,7 @@ int ComTerpServ::runfile(const char* fil
|
|
#elif __GNUC__==3 && __GNUC_MINOR__<1
|
|
FILE* ofptr = handler() ? fdopen(handler()->get_handle(), "w") : stdout;
|
|
fileptr_filebuf obuf(ofptr, ios_base::out);
|
|
-#elif __GNUC__>3
|
|
+#elif __GNUC__>3 || (__GNUC__==3 && __GNUC_MINOR__ >= 4)
|
|
FILE* ofptr = handler() ? handler()->wrfptr() : stdout;
|
|
fileptr_filebuf obuf(ofptr, ios_base::out);
|
|
#else
|
|
@@ -363,7 +363,7 @@ int ComTerpServ::runfile(const char* fil
|
|
#elif __GNUC__==3 && __GNUC_MINOR__<1
|
|
FILE* ofptr = handler() ? fdopen(handler()->get_handle(), "w") : stdout;
|
|
fileptr_filebuf obuf(ofptr, ios_base::out);
|
|
-#elif __GNUC__>3
|
|
+#elif __GNUC__>3 || (__GNUC__==3 && __GNUC_MINOR__ >= 4)
|
|
FILE* ofptr = handler() ? handler()->wrfptr() : stdout;
|
|
fileptr_filebuf obuf(ofptr, ios_base::out);
|
|
#else
|