summaryrefslogtreecommitdiffstats
path: root/x11-wm/pawm/files/patch-src_cfgpool.c
diff options
context:
space:
mode:
authortrevor <trevor@FreeBSD.org>2003-10-18 23:48:03 +0000
committertrevor <trevor@FreeBSD.org>2003-10-18 23:48:03 +0000
commitfd4e1ae6a052c884ba4581055313b19b3221b727 (patch)
treee433806be122bbc49460cde85222a7224b7b8b5b /x11-wm/pawm/files/patch-src_cfgpool.c
parentabb5269fa28a3f84bef22223978e1388bf2cff19 (diff)
downloadFreeBSD-ports-fd4e1ae6a052c884ba4581055313b19b3221b727.zip
FreeBSD-ports-fd4e1ae6a052c884ba4581055313b19b3221b727.tar.gz
Add support for FreeBSD 4.X (requested by kris). Update to 1.9.4.
Fix ordering of packing list.
Diffstat (limited to 'x11-wm/pawm/files/patch-src_cfgpool.c')
-rw-r--r--x11-wm/pawm/files/patch-src_cfgpool.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/x11-wm/pawm/files/patch-src_cfgpool.c b/x11-wm/pawm/files/patch-src_cfgpool.c
new file mode 100644
index 0000000..b18c298
--- /dev/null
+++ b/x11-wm/pawm/files/patch-src_cfgpool.c
@@ -0,0 +1,56 @@
+$FreeBSD$
+
+FreeBSD 4 is not C99-compliant.
+
+--- src/cfgpool.c.orig Wed Aug 6 14:27:17 2003
++++ src/cfgpool.c Sat Oct 18 17:18:40 2003
+@@ -309,13 +309,13 @@ legal value*. So, for proper error check
+ EINVAL: Couldn't parse a well-formed natural number.
+ ERANGE: Overflow while parsing the number.
+ */
+-uintmax_t
++u_int32_t
+ cfgpool_getnatural (CfgPool pool, const char *key, unsigned int base) {
+
+ char *value=NULL;
+ char *tailptr=NULL;
+ int tmperrno=errno;
+- uintmax_t natural=0;
++ u_int32_t natural=0;
+
+ ASSERT(pool);
+ ASSERT(key);
+@@ -329,7 +329,7 @@ cfgpool_getnatural (CfgPool pool, const
+
+ /* Well, it seems we have a value... Translate to correct type */
+ errno=0;
+- natural=strtoumax(value, &tailptr, base);
++ natural=strtoull(value, &tailptr, base);
+
+ if (errno) natural=0,tmperrno=ERANGE;
+ if ((!natural) && (tailptr==value)) tmperrno=EINVAL;
+@@ -359,13 +359,13 @@ legal value*. So, for proper error check
+ ERANGE: Overflow while parsing the number.
+ */
+
+-intmax_t
++u_int32_t
+ cfgpool_getinteger (CfgPool pool, const char *key, unsigned int base) {
+
+ char *value=NULL;
+ char *tailptr=NULL;
+ int tmperrno=errno;
+- intmax_t integer=0;
++ u_int32_t integer=0;
+
+ ASSERT(pool);
+ ASSERT(key);
+@@ -379,7 +379,7 @@ cfgpool_getinteger (CfgPool pool, const
+
+ /* Well, it seems we have a value... Translate to correct type */
+ errno=0;
+- integer=strtoimax(value, &tailptr, base);
++ integer=strtoll(value, &tailptr, base);
+
+ if (errno) integer=0,tmperrno=ERANGE;
+ if ((!integer) && (tailptr==value)) tmperrno=EINVAL;
OpenPOWER on IntegriCloud