git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: size_t vs "unsigned long"

From
KMKyle Moffett <mrmacman_g4@mac.com>
Date
Oct 5, 2007, 06:27 UTC
Message-ID
<620B5C1C-CFE8-401B-8BC7-D89C8740D63B@mac.com>
In-Reply-To
<877im3khj0.fsf@mid.deneb.enyo.de>
On Oct 03, 2007, at 17:36:03, Florian Weimer wrote:
Show 8 quoted lines
> * Pierre Habouzit:
>> Well, afaict, on every linux archs I know of, unsigned longs and  
>> size_t are the same.
>
> IIRC, 64-bit Windows uses 64-bit points (duh) and hence a 64-bit  
> size_t, but still has got 32-bit longs.  Documentation is a bit  
> sparse on this matter (because you are supposed to use LONG, DWORD  
> and friends anyway).

For reference, Linux is always an LP32 (long-and-pointer-are-32-bit) or LP64 (long-and-pointer-are-64-bit) platform. On the other hand, for crappy backwards-compat reasons, Windows is either LP32 or LLP64 (long-long-and-pointer-are-64-bit). I think most of the remaining UNIXes fall into the LP32/LP64 category, the LLP64 platforms are fairly rare (thankfully).

Cheers, Kyle Moffett

Previous: Florian Weimer
Message 8 of 8 in “size_t vs "unsigned long"”
  1. Junio C HamanoOct 3, 2007
  2. Pierre HabouzitOct 3, 2007
  3. Junio C HamanoOct 3, 2007
  4. Jan WielemakerOct 3, 2007
  5. Pierre HabouzitOct 3, 2007
  6. Jan WielemakerOct 4, 2007
  7. Florian WeimerOct 3, 2007
  8. Kyle MoffettOct 5, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.