# Repost : 64 Bit Integer support

- Thread: https://externals.io/message/5276
- Original archive: https://news-web.php.net/php.internals/5276
- Started by l0t3k on 2003-11-06T00:58:41+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #5276 — l0t3k — 2003-11-06T00:58:41+00:00

URL: https://externals.io/message/5276#5276

Question :
 is there any one of the supported platforms that dont support a 64 bit
integer
type. i'm not referring to the native int size.
for one i can think of Windows 95/98.

i'm porting a library and i need to know this so i can determine how to
proceed.

l0t3k

---

## #5279 — Wez Furlong — 2003-11-06T01:26:37+00:00

URL: https://externals.io/message/5276#5279 · In reply to: #5276

64 bit integer support is really a function of the compiler, not the OS.
The windows compiler certainly does support a 64 bit integer type (INT64
iirc).

There is probably a configure check somewhere (the bundled mysql client
library from 4.3 branch comes to mind) that you can use to make the decision
on 64 bit support.

--Wez.

----- Original Message ----- 
From: "l0t3k" <cshmoove@bellsouth.net>
To: <internals@lists.php.net>
Sent: Thursday, November 06, 2003 1:58 AM
Subject: [PHP-DEV] Repost : 64 Bit Integer support


> Question :
>  is there any one of the supported platforms that dont support a 64 bit
> integer
> type. i'm not referring to the native int size.
> for one i can think of Windows 95/98.
>
> i'm porting a library and i need to know this so i can determine how to
> proceed.

---

## #5282 — l0t3k — 2003-11-06T02:52:26+00:00

URL: https://externals.io/message/5276#5282 · In reply to: #5279

thanks, wez

> There is probably a configure check somewhere (the bundled mysql client
> library from 4.3 branch comes to mind) that you can use to make the
decision
> on 64 bit support.

my concern is not the configure check, per se. im just concerned that having
the
extension depend on 64bit support would eliminate a significant supported
platform.
 as i current only have access to MSVC and gcc, i wanted to
do a quick shout to see if someone knew offhand which of the popular
compilers
would have an issue.

l0t3k
p.s.. its a largish codebase with 2 developers, so i wouldnt want to
simultanously
support a 64bit and a 32bit branch.


> --Wez.

---

## #5307 — Michael Walter — 2003-11-06T22:47:43+00:00

URL: https://externals.io/message/5276#5307 · In reply to: #5282

Maybe something like that could help you:

#define HAS_INT64_PRIMITIVE
#ifdef MSVC
#define int64_t __int64
#elif ...
#else
typedef struct int64_t_ { int32_t a, b; } int64_t;
#undef HAS_INT64_PRIMITIVE
#endif

- Michael
