summaryrefslogtreecommitdiff
path: root/lang/ossp-js/patches/patch-ai
blob: 04dc3db3903cfbf63eab70075f1409ae4cd22a11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-ai,v 1.2 2015/12/29 23:34:53 dholland Exp $

Get pointer-sized ints portably.
XXX: why HAVE_INTTYPES_H vs. include <stdint.h>?

--- src/jstypes.h.orig	2006-07-24 15:21:49.000000000 -0400
+++ src/jstypes.h
@@ -387,8 +387,14 @@ typedef JSUint8 JSPackedBool;
 /*
 ** A JSWord is an integer that is the same size as a void*
 */
+#ifdef HAVE_INTTYPES_H
+#include <stdint.h>
+typedef intptr_t JSWord;
+typedef uintptr_t JSUword;
+#else
 typedef long JSWord;
 typedef unsigned long JSUword;
+#endif
 
 #include "jsotypes.h"