updated for version 7.3.1262
Problem: Crash and compilation warnings with Cygwin.
Solution: Check return value of XmbTextListToTextProperty(). Add type casts.
Adjust #ifdefs. (Lech Lorens)
diff --git a/src/os_unix.c b/src/os_unix.c
index f878fa9..8a7ae10 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1559,7 +1559,7 @@
{
/* This function should not return, it causes exit(). Longjump instead. */
LONGJMP(lc_jump_env, 1);
-# ifdef VMS
+# if defined(VMS) || defined(__CYGWIN__) || defined(__CYGWIN32__)
return 0; /* avoid the compiler complains about missing return value */
# endif
}
@@ -1581,7 +1581,7 @@
/* This function should not return, it causes exit(). Longjump instead. */
LONGJMP(x_jump_env, 1);
-# ifdef VMS
+# if defined(VMS) || defined(__CYGWIN__) || defined(__CYGWIN32__)
return 0; /* avoid the compiler complains about missing return value */
# endif
}
@@ -5929,7 +5929,7 @@
# if defined(__CYGWIN__) || defined(__CYGWIN32__)
/* Translate <CR><NL> into <NL>. Caution, buffer may contain NUL. */
p = buffer;
- for (i = 0; i < len; ++i)
+ for (i = 0; i < (int)len; ++i)
if (!(buffer[i] == CAR && buffer[i + 1] == NL))
*p++ = buffer[i];
len = p - buffer;