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

Re: [PATCH 1/3] index-helper: fix UNIX_PATH_MAX redefinition error on cygwin

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Apr 11, 2016, 13:30 UTC
Message-ID
<570BA6EF.7020202@ramsayjones.plus.com>
In-Reply-To
<570B2605.4040305@web.de>
On 11/04/16 05:20, Torsten Bögershausen wrote:
> On 04/11/2016 12:59 AM, Ramsay Jones wrote:
> The header mentions cygwin, but changes it for linux, BSD and Mac OS as well.
> Is this intentional ?

Yes. I only compile on 32/64-bit linux and 64-bit cygwin these days, so I only noticed the warnings (yes I wrote error, but it should be warning) on cygwin. Other systems may suffer the same warnings, of course.

Show 20 quoted lines
>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>> ---
>>   git-compat-util.h | 17 -----------------
>>   index-helper.c    |  4 ++--
>>   read-cache.c      |  2 +-
>>   3 files changed, 3 insertions(+), 20 deletions(-)
>>
>> diff --git a/git-compat-util.h b/git-compat-util.h
>> index 0e35c13..c90c8c6 100644
>> --- a/git-compat-util.h
>> +++ b/git-compat-util.h
>> @@ -1043,21 +1043,4 @@ struct tm *git_gmtime_r(const time_t *, struct tm *);
>>   #define getc_unlocked(fh) getc(fh)
>>   #endif
>>   -#ifdef __linux__
>> -#define UNIX_PATH_MAX 108
>> -#elif defined(__APPLE__) || defined(BSD)
>> -#define UNIX_PATH_MAX 104
>> -#else
> Can we use a #elif __CYGWIN__ here to fix the re-definition just for cygwi ?

As I said in the cover letter, that is an option - but why bother with UNIX_PATH_MAX at all?

ATB, Ramsay Jones

Previous: Torsten BögershausenNext: David Turner
Message 3 of 4 in “index-helper: fix UNIX_PATH_MAX redefinition error on cygwin”
  1. 1/3 index-helper: fix UNIX_PATH_MAX redefinition error on cygwinRamsay Jones, Apr 10, 2016
  2. Torsten BögershausenApr 11, 2016
  3. Ramsay JonesApr 11, 2016
  4. David TurnerApr 11, 2016

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.