diff options
author | fenner <fenner@FreeBSD.org> | 2003-01-24 09:44:47 +0800 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2003-01-24 09:44:47 +0800 |
commit | 344838b5b56b87e8fa414cb4295d59079dc20fbe (patch) | |
tree | 11af9664bce10084a36ab39c953efe5bcb4845ca | |
parent | 02109932cf01112d7eeb8af0c79b6db07dc6f6d2 (diff) | |
download | freebsd-ports-gnome-344838b5b56b87e8fa414cb4295d59079dc20fbe.tar.gz freebsd-ports-gnome-344838b5b56b87e8fa414cb4295d59079dc20fbe.tar.zst freebsd-ports-gnome-344838b5b56b87e8fa414cb4295d59079dc20fbe.zip |
Handle the case where sizeof(long) > sizeof(int)
-rw-r--r-- | devel/uclmmbase/files/patch-af | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/devel/uclmmbase/files/patch-af b/devel/uclmmbase/files/patch-af new file mode 100644 index 000000000000..d380c5522694 --- /dev/null +++ b/devel/uclmmbase/files/patch-af @@ -0,0 +1,25 @@ +--- src/mbus_parser.c.orig Thu Jan 23 17:39:55 2003 ++++ src/mbus_parser.c Thu Jan 23 17:41:26 2003 +@@ -158,6 +158,7 @@ + int mbus_parse_int(struct mbus_parser *m, int *i) + { + char *p; ++ long l; + + assert(m->magic == MBUS_PARSER_MAGIC); + +@@ -166,11 +167,12 @@ + CHECK_OVERRUN; + } + +- *i = strtol(m->buffer, &p, 10); +- if (((*i == LONG_MAX) || (*i == LONG_MIN)) && (errno == ERANGE)) { ++ l = strtol(m->buffer, &p, 10); ++ if (((l >= INT_MAX) || (l <= INT_MIN)) && (errno == ERANGE)) { + debug_msg("integer out of range\n"); + return FALSE; + } ++ *i = l; + + if (p == m->buffer) { + return FALSE; |