summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/gettext.h10
-rw-r--r--lib/Handle.cc2
-rw-r--r--lib/Input.cc6
-rw-r--r--lib/Main.cc2
-rw-r--r--lib/Output.cc3
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 <locale.h> a NOP. We don't include <libintl.h>
- as well because people using "gettext.h" will not include <libintl.h>,
- and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
- is OK. */
-#if defined(__sun)
-# include <locale.h>
-#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