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

Re: [PATCH] statinfo.h: move DTYPE defines from dir.h

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 3, 2023, 01:56 UTC
Message-ID
<xmqqilc571hf.fsf@gitster.g>
In-Reply-To
<20230602192700.1548636-1-asedeno@google.com>
"Alejandro R Sedeño" <asedeno@google.com> writes:
Show 13 quoted lines
> From: Alejandro R. Sedeño <asedeno@mit.edu>
>
> These definitions are used in cache.h, which can't include dir.h
> without causing name-hash.c to have two definitions of
> `struct dir_entry`.
>
> Both dir.h and cache.h include statinfo.h, and this seems a reasonable
> place for these definitions.
>
> This change fixes a broken build issue on old SunOS.
>
> Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
> Signed-off-by: Alejandro R Sedeño <asedeno@google.com>

This is a bit unusual; do you want to publish both names (I am assuming that they are the same single person)?

I thought somebody in the earlier discussion identified the topic that was problematic by bisecting. It is a shame to lose that. Perhaps it is a good idea to rephrase the beginning of the proposed commit log message to mention that, like

    592fc5b3 (dir.h: move DTYPE defines from cache.h, 2023-04-22)
    moved DTYPE macros from cache.h to dir.h, but are still used
    by cache.h to implement ce_to_dtype(); but cache.h cannot
    include dir.h because ...
or something?

Why does name-hash.c end up with two definitions? Aren't we properly guarding against multiple inclusions with

    #ifndef __DIR_H__
    #define __DIR_H__
	...
    struct dir_entry {
	...
    };
    #endif
or is there something funny going on?
Thanks.
Previous: Elijah NewrenNext: Elijah Newren
Message 7 of 12 in “statinfo.h: move DTYPE defines from dir.h”
  1. statinfo.h: move DTYPE defines from dir.hAleajndro R Sedeño, Jun 2, 2023
  2. Alejandro SedeñoJun 2, 2023
  3. Eric SunshineJun 2, 2023
  4. Alejandro SedeñoJun 2, 2023
  5. statinfo.h: move DTYPE defines from dir.hAlejandro R Sedeño, Jun 2, 2023
  6. Elijah NewrenJun 3, 2023
  7. Junio C HamanoJun 3, 2023
  8. Elijah NewrenJun 3, 2023
  9. Junio C HamanoJun 3, 2023
  10. Alejandro SedeñoJun 3, 2023
  11. statinfo.h: move DTYPE defines from dir.hAlejandro R Sedeño, Jun 6, 2023
  12. Junio C HamanoJun 12, 2023

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.