Hi,
gcc 4.1.2
CFLAGS="-m64 -mcpu=v9"
1. neon-0.26.3 bus error on Solaris9/sparc64 in src/ne_md5.c:126:
$ gmake check
...
-> running `util-tests':
0. status_lines.......... pass
1. md5................... ./run.sh[16]: 21770 Bus Error(coredump)
FAILURE
gmake[1]: *** [check] Error 1
Program terminated with signal 10, Bus error.
#0 0x7fffffff7fa0fd54 in ne_md5_read_ctx (ctx=0x10010a640,
resbuf=0xffffffff7ffff81f) at ne_md5.c:126
126 ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
(gdb) where
#0 0x7fffffff7fa0fd54 in ne_md5_read_ctx (ctx=0x10010a640,
resbuf=0xffffffff7ffff81f) at ne_md5.c:126
#1 0x0000000100002424 in digest_md5 (data=0x1000049c0 "", len=0,
digest=0xffffffff7ffff81f "") at util-tests.c:117
#2 0x000000010000249c in md5 () at util-tests.c:129
#3 0x0000000100002e20 in main (argc=<value optimized out>,
argv=<value optimized out>) at common/tests.c:236
2. neon-0.26.3 incorrect work with timezone on Solaris9/sparc64:
$ configure
...
checking for struct tm.tm_gmtoff... no
checking for struct tm.__tm_gmtoff... no
configure: WARNING: no timezone handling in date parsing on this platform
$ gmake check
...
-> running `util-tests':
0. status_lines.......... pass
1. md5................... pass
2. md5_alignment......... pass
3. parse_dates........... FAIL (date 0 incorrect (992026786 not 992041186))
4. regress_dates......... pass
5. versioning............ pass
6. version_string........ pass
7. support............... pass
<- summary for `util-tests': of 8 tests run: 7 passed, 1 failed. 87.5%
FAILURE
gmake[1]: *** [check] Error 1
Please review my attached patches.
Thanks!
--
Alex Deiter
--- src/ne_md5.c.orig 2006-03-01 20:28:58.000000000 +0300
+++ src/ne_md5.c 2007-03-12 11:36:25.741483000 +0300
@@ -123,10 +123,19 @@
const struct md5_ctx *ctx;
void *resbuf;
{
- ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
- ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
- ((md5_uint32 *) resbuf)[2] = SWAP (ctx->C);
- ((md5_uint32 *) resbuf)[3] = SWAP (ctx->D);
+ md5_uint32 res;
+
+ res = SWAP (ctx->A);
+ memcpy(resbuf, &res, sizeof(res));
+
+ res = SWAP (ctx->B);
+ memcpy(resbuf+sizeof(res), &res, sizeof(res));
+
+ res = SWAP (ctx->C);
+ memcpy(resbuf+sizeof(res)*2, &res, sizeof(res));
+
+ res = SWAP (ctx->D);
+ memcpy(resbuf+sizeof(res)*3, &res, sizeof(res));
return resbuf;
}
--- src/ne_dates.c 2006-05-24 00:27:37.000000000 +0400
+++ src/ne_dates.c 2007-01-18 00:36:47.225996000 +0300
@@ -72,7 +72,9 @@
#define GMTOFF(t) (gmt_to_local_win32())
#else
/* FIXME: work out the offset anyway. */
-#define GMTOFF(t) (0)
+extern time_t timezone, altzone;
+extern int daylight;
+#define GMTOFF(t) (-(daylight ? altzone : timezone))
#endif
#ifdef WIN32
@@ -154,6 +156,7 @@
gmt.tm_isdst = -1;
gmt.tm_mon--;
+ tzset();
return mktime(&gmt) + fix + GMTOFF(gmt);
}
@@ -177,6 +180,7 @@
* since the mktime will then fail */
gmt.tm_mon = n;
gmt.tm_isdst = -1;
+ tzset();
return mktime(&gmt) + GMTOFF(gmt);
}
@@ -207,6 +211,7 @@
gmt.tm_mon = n;
gmt.tm_isdst = -1;
+ tzset();
return mktime(&gmt) + GMTOFF(gmt);
}
@@ -231,6 +236,7 @@
* since the mktime will then fail */
gmt.tm_mon = n;
gmt.tm_isdst = -1;
+ tzset();
return mktime(&gmt) + GMTOFF(gmt);
}
_______________________________________________
neon mailing list
[email protected]
http://mailman.webdav.org/mailman/listinfo/neon