Re: [PATCH 2/6] path: Make the 'get_st_mode_bits' symbol a file static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx> writes:

> On MinGW, sparse issues an "'get_st_mode_bits' not declared. Should
> it be static?" warning. The MinGW and MSVC builds do not see the
> declaration of this function, within git-compat-util.h, due to it's
> placement within an preprocessor conditional. (So, one solution would
> be to simply move the declaration to the top level of the header.)

Well, the idea was that the user of this function in path.c will
call get_st_mode_bits(), and whatever platform that provides a
replacement implementation would do

	#define get_st_mode_bits(a,b) cygwin_get_st_mode_bits((a),(b))

so that the calling site in path.c will end up calling that
replacement implementation.  So if anything get_st_mode_bits()
declaration may want to go at the _end_ (not top) after including
all the compatibility crufts.

We could make the declaration static to path.c, but then nobody
other than path.c would be able to make use of it in the future,
and we'll have the same discussion when somebody wants to hoist the
declaration to git-compat-util.h, no?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]