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

Re: [PATCH] Add support for uintmax_t type on FreeBSD 4.9

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 27, 2008, 05:30 UTC
Message-ID
<7vy70aip06.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1225021957-11880-1-git-send-email-david.syzdek@acsalaska.net>
"David M. Syzdek" <david.syzdek@acsalaska.net> writes:
Show 15 quoted lines
> This adds NO_UINTMAX_T for ancient systems. If NO_UINTMAX_T is defined, then
> uintmax_t is defined as uint32_t. This adds a test to configure.ac for
> uintmax_t and adds a check to the Makefile for FreeBSD 4.9-SECURITY.
> ...
> diff --git a/Makefile b/Makefile
> index 0d40f0e..bf6a6dc 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -931,6 +931,9 @@ endif
>  ifdef NO_IPV6
>  	BASIC_CFLAGS += -DNO_IPV6
>  endif
> +ifdef NO_UINTMAX_T
> +	BASIC_CFLAGS += -Duintmax_t=uint32_t
> +endif
I have a stupid question.
Would it be a more appropriate improvement to do it like this:
	ifdef USE_THIS_AS_UINTMAX_T
            BASIC_CFLAGS += -Duintmax_t="$(USE_THIS_AS_UINTMAX_T)"
        endif
and then add a section for FreeBSD 4.9-SECURITY like this:
	ifeq ($(uname_R),4.9-SECURITY)
        	USE_THIS_AS_UINTMAX_T = uint32_t
	endif

That way, an oddball 64-bit machine can use uint64_t here if it wants to, possibly including FreeBSD 4.9-SECURITY backported to 64-bit ;-).

Previous: David M. SyzdekNext: David Syzdek
Message 2 of 6 in “Add support for uintmax_t type on FreeBSD 4.9”
  1. Add support for uintmax_t type on FreeBSD 4.9David M. Syzdek, Oct 26, 2008
  2. Junio C HamanoOct 27, 2008
  3. David SyzdekOct 27, 2008
  4. Junio C HamanoOct 27, 2008
  5. David SyzdekOct 27, 2008
  6. Junio C HamanoOct 28, 2008

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.