From c477f1a35d23a9a3d3e29622b013532343c078cc Mon Sep 17 00:00:00 2001 From: pixel Date: Sat, 12 Jul 2003 03:12:16 +0000 Subject: GOT THAT FUCKING BUG OUT!@#!%!#!@#!@$#@!!@ --- include/gettext.h | 10 ---------- lib/Handle.cc | 2 +- lib/Input.cc | 6 +++++- lib/Main.cc | 2 +- lib/Output.cc | 3 +++ 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include/gettext.h b/include/gettext.h index 689f8de..bb3158f 100644 --- a/include/gettext.h +++ b/include/gettext.h @@ -27,16 +27,6 @@ #else -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of a NOP. We don't include - as well because people using "gettext.h" will not include , - and also including would fail on SunOS 4, whereas - is OK. */ -#if defined(__sun) -# include -#endif - /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. diff --git a/lib/Handle.cc b/lib/Handle.cc index 7207f36..d366382 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -318,7 +318,7 @@ void Handle::SetZ(int az) throw (GeneralException) { format[index++] = (char) (az + '0'); format[index] = 0; #ifdef FULLDEBUG - printm(M_INFO, _("Performing gzdopen on handle ") << h << _(" with mode \"") + format + "\"\n"; + printm(M_INFO, String(_("Performing gzdopen on handle ")) + h + _(" with mode \"") + format + "\"\n"); #endif if (!(zfile = gzdopen(h, format))) { throw GeneralException(_("Was not able to gzdopen.")); diff --git a/lib/Input.cc b/lib/Input.cc index bfb771c..ed549ec 100644 --- a/lib/Input.cc +++ b/lib/Input.cc @@ -164,7 +164,11 @@ int Input::wrapopen(const String & fname, openresults_t * results) { } } results->name = ""; - return open(fname.to_charp(), O_RDONLY); + return open(fname.to_charp(), O_RDONLY +#ifdef _WIN32 + | O_BINARY +#endif + ); } void Input::SetZ(int l) throw(GeneralException) { diff --git a/lib/Main.cc b/lib/Main.cc index 992f73c..9e2891b 100644 --- a/lib/Main.cc +++ b/lib/Main.cc @@ -3,7 +3,7 @@ #endif #include "Main.h" #include "generic.h" -#include "gettext.h" +//#include "gettext.h" Main::Main() : setted(false) {} diff --git a/lib/Output.cc b/lib/Output.cc index 811918c..82940f6 100644 --- a/lib/Output.cc +++ b/lib/Output.cc @@ -22,6 +22,9 @@ Output::Output(String no, int create, int trunc) throw (GeneralException) : Handle(no.strlen() ? open(no.to_charp(), O_WRONLY | (O_CREAT * (create ? 1 : 0)) | (O_TRUNC * (trunc ? 1 : 0)) +#ifdef _WIN32 +| O_BINARY +#endif #if defined __linux__ || defined __CYGWIN32__ , 00666 #endif -- cgit v1.2.3