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

Re: 1.3.2.gde1d fails to build on OpenBSD

From
Linus Torvalds <torvalds@osdl.org>
Date
May 15, 2006, 16:00 UTC
Message-ID
<Pine.LNX.4.64.0605150854420.3866@g5.osdl.org>
In-Reply-To
<86psiftlgf.fsf@blue.stonehenge.com>
On Mon, 15 May 2006, Randal L. Schwartz wrote:
Show 11 quoted lines
> 
> GIT_VERSION = 1.3.2.gde1d
> gcc -o sha1_file.o -c -g -O2 -Wall -I/usr/local/include -DSHA1_HEADER='<openssl/sha.h>' -DNO_STRCASESTR sha1_file.c
> sha1_file.c:16:20: stdint.h: No such file or directory
> gmake: *** [sha1_file.o] Error 1
> 
> I think you want
> 
>         #include <sys/types.h>
> 
> on OpenBSD.

Gaah. This was one reason why I absolutely _detested_ those "intXX_t" types historically. I thought the world had gotten over it, and they were all so common and standard that we'd never need to worry about it.

Randal: we already _do_ include <sys/types.h>, as part of the standard set 
of headers in git-compat-util.h.

So the problem is that that wasn't enough on OS X, which wanted <stdint.h>.

Junio: I'd suggest just using "unsigned int", or just defining your own 
types in "cache.h". I would suggest
	typedef unsigned char u8;
	typedef unsigned short u16;
	typedef unsigned int u32;
	typedef signed char s8;
	typedef short s16;
	typedef int s32;

which is the only sane way to avoid idiotic crap like autoconf, and which avoids that whole "standard namespace" issue.

Yeah, some people will complain. Ten years later, they _still_ complain about me doing this right in the kernel. But you can sleep well, knowing that the complainers are standards-weenies that have read books, but never seen the real world.

				Linus
Previous: Randal L. Schwartz
Message 4 of 4 in “1.3.2.gde1d fails to build on OpenBSD”
  1. Randal L. SchwartzMay 15, 2006
  2. Timo HirvonenMay 15, 2006
  3. Randal L. SchwartzMay 15, 2006
  4. Linus TorvaldsMay 15, 2006

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.