| Ilya Zakharevich on Wed, 03 Feb 2010 15:38:32 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: PARI stable release 2.3.5 (for real now) |
On Fri, Jan 29, 2010 at 11:09:50PM +0100, Bill Allombert wrote:
> Please test!
a) ./configure is broken under OS/2. The attached fix changes
if test -s $exe -a -x $exe ; then
to
if test -s $exe ; then
if test -x $exe -o "$osname" = os2 ; then
plus correction of whitespace (and `fi').
b) os2.c was producing warnings about string signedness (fixed).
Yours,
Ilya
--- ./config/look.pre Mon Mar 31 04:43:58 2008
+++ ./config/look Wed Feb 3 04:20:48 2010
@@ -2,13 +2,15 @@
# defining has_$fun
for fun in $list; do
if ($CC $CFLAGS has_$fun.c -o $exe $extra_flags > /dev/null 2>&1); then
- if test -s $exe -a -x $exe ; then
- eval "has_$fun=yes"; echo ..."Found $fun."
- case "$_has_list" in
- *has_$fun*);;
- *) _has_list="$_has_list has_$fun";;
- esac
- break
+ if test -s $exe ; then
+ if test -x $exe -o "$osname" = os2 ; then
+ eval "has_$fun=yes"; echo ..."Found $fun."
+ case "$_has_list" in
+ *has_$fun*);;
+ *) _has_list="$_has_list has_$fun";;
+ esac
+ break
+ fi
fi
fi;
eval "has_$fun=no"; echo ..."I did not find $fun."
--- ./src/systems/os2/os2.c-pre Mon Mar 31 04:43:58 2008
+++ ./src/systems/os2/os2.c Wed Feb 3 05:33:14 2010
@@ -4,6 +4,8 @@
#include <os2.h>
#include <float.h>
#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
static ULONG retcode;
static char fail[300];
@@ -83,7 +85,7 @@ dlopen(char *path, int mode)
retcode = rc;
return 0;
}
- rc = DosLoadModule(fail, sizeof fail, dllname, &handle);
+ rc = DosLoadModule((PSZ)fail, sizeof fail, (PSZ)dllname, &handle);
if (rc) {
strcpy(fail, "can't load my own DLL");
retcode = rc;
@@ -96,7 +98,7 @@ dlopen(char *path, int mode)
strcpy(fail, "can't load from myself: compiled without -DDLOPEN_INITTERM");
return 0;
}
- if ((rc = DosLoadModule(fail, sizeof fail, path, &handle)) == 0)
+ if ((rc = DosLoadModule((PSZ)fail, sizeof fail, (PSZ)path, &handle)) == 0)
goto ret;
retcode = rc;
@@ -112,7 +114,7 @@ dlopen(char *path, int mode)
int n = beg+8-path;
memmove(tmp, path, n);
memmove(tmp+n, dot, strlen(dot)+1);
- rc = DosLoadModule(fail, sizeof fail, tmp, &handle);
+ rc = DosLoadModule((PSZ)fail, sizeof fail, (PSZ)tmp, &handle);
if (rc == 0)
goto ret;
retcode = rc;
@@ -133,9 +135,9 @@ dlsym(void *handle, char *symbol)
PFN addr;
fail[0] = 0;
- rc = DosQueryProcAddr((HMODULE)handle, 0, symbol, &addr);
+ rc = DosQueryProcAddr((HMODULE)handle, 0, (PSZ)symbol, &addr);
if (rc == 0) {
- rc = DosQueryProcType((HMODULE)handle, 0, symbol, &type);
+ rc = DosQueryProcType((HMODULE)handle, 0, (PSZ)symbol, &type);
if (rc == 0 && type == PT_32BIT)
return (void *)addr;
rc = ERROR_WRONG_PROCTYPE;
@@ -158,7 +160,7 @@ dlerror(void)
}
if ((retcode != ERROR_WRONG_PROCTYPE)
&& DosGetMessage(NULL, 0, buf, sizeof buf - 1, retcode,
- "OSO001.MSG", &len)) {
+ (PSZ)"OSO001.MSG", &len)) {
if (fail[0])
sprintf(buf,
"OS/2 system error code %d, possible problematic module: '%s'",