aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/ChangeLog10
-rw-r--r--util/secmem.c10
-rw-r--r--util/simple-gettext.c15
-rw-r--r--util/ttyio.c21
4 files changed, 35 insertions, 21 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index d5b661095..9d2220540 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,13 @@
+Fri Sep 17 12:56:42 CEST 1999 Werner Koch <[email protected]>
+
+
+ * secmem.c (lock_pool): Check for ENOSYS return my mlock() on
+ old SCOs.
+
+ * ttyio.c (do_get): Replaced #if __MINGW32__ by #ifdef becuase
+ gcc 2.95.1 assigns a floating point value (0.2) to this macro,
+ which in turn can't be used in an expression.
+
Wed Sep 15 16:22:17 CEST 1999 Werner Koch <[email protected]>
diff --git a/util/secmem.c b/util/secmem.c
index 3f253d6db..db4ee4148 100644
--- a/util/secmem.c
+++ b/util/secmem.c
@@ -97,8 +97,11 @@ lock_pool( void *p, size_t n )
#ifdef EAGAIN /* OpenBSD returns this */
&& errno != EAGAIN
#endif
+ #ifdef ENOSYS /* Some SCOs return this (function not implemented) */
+ && errno != ENOSYS
+ #endif
)
- log_error("can�t lock memory: %s\n", strerror(err));
+ log_error("can't lock memory: %s\n", strerror(err));
show_warning = 1;
}
@@ -134,8 +137,11 @@ lock_pool( void *p, size_t n )
#ifdef EAGAIN /* OpenBSD returns this */
&& errno != EAGAIN
#endif
+ #ifdef ENOSYS /* Some SCOs return this (function not implemented) */
+ && errno != ENOSYS
+ #endif
)
- log_error("can�t lock memory: %s\n", strerror(err));
+ log_error("can't lock memory: %s\n", strerror(err));
show_warning = 1;
}
diff --git a/util/simple-gettext.c b/util/simple-gettext.c
index bf25e8b18..21f39382d 100644
--- a/util/simple-gettext.c
+++ b/util/simple-gettext.c
@@ -464,5 +464,20 @@ gettext( const char *msgid )
return msgid;
}
+#if 0
+ unsigned int cp1, cp2;
+
+ cp1 = GetConsoleCP();
+ cp2 = GetConsoleOutputCP();
+
+ log_info("InputCP=%u OutputCP=%u\n", cp1, cp2 );
+
+ if( !SetConsoleOutputCP( 1252 ) )
+ log_info("SetConsoleOutputCP failed: %d\n", (int)GetLastError() );
+
+ cp1 = GetConsoleCP();
+ cp2 = GetConsoleOutputCP();
+ log_info("InputCP=%u OutputCP=%u after switch1\n", cp1, cp2 );
+#endif
#endif /* USE_SIMPLE_GETTEXT */
diff --git a/util/ttyio.c b/util/ttyio.c
index 6c1a5059a..35e0d318f 100644
--- a/util/ttyio.c
+++ b/util/ttyio.c
@@ -107,23 +107,6 @@ init_ttyfp(void)
SetConsoleMode(con.in, DEF_INPMODE );
SetConsoleMode(con.out, DEF_OUTMODE );
-#warning DEBUG CODE
- {
- unsigned int cp1, cp2;
-
- cp1 = GetConsoleCP();
- cp2 = GetConsoleOutputCP();
-
- log_info("InputCP=%u OutputCP=%u\n", cp1, cp2 );
-
- if( !SetConsoleOutputCP( 1252 ) )
- log_info("SetConsoleOutputCP failed: %d\n", (int)GetLastError() );
-
- cp1 = GetConsoleCP();
- cp2 = GetConsoleOutputCP();
- log_info("InputCP=%u OutputCP=%u after switch1\n", cp1, cp2 );
-
- }
#elif defined(__EMX__)
ttyfp = stdout; /* Fixme: replace by the real functions: see wklib */
#else
@@ -304,7 +287,7 @@ do_get( const char *prompt, int hidden )
buf = m_alloc(n=50);
i = 0;
- #if __MINGW32__ /* windoze version */
+ #ifdef __MINGW32__ /* windoze version */
if( hidden )
SetConsoleMode(con.in, HID_INPMODE );
@@ -419,7 +402,7 @@ tty_kill_prompt()
last_prompt_len = 0;
if( !last_prompt_len )
return;
- #if __MINGW32__
+ #ifdef __MINGW32__
tty_printf("\r%*s\r", last_prompt_len, "");
#else
{