Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-05-08 Thread Junio C Hamano
Duy Nguyen writes: > I don't think the other two were the problem. Even in the mail you > pointed to, only fileno() is acknowledged the problem in the commit > message. > > At least for BSDs fflush() and rewind() are not macros. I can drop the dm/some-stdio-functions-are-macro-on-freebsd topic s

Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-05-08 Thread Duy Nguyen
On Wed, May 8, 2019 at 2:47 PM Junio C Hamano wrote: > > Dan McGregor writes: > > >>I don't think this is enough. At least fbsd defines this > >> > >>#definefileno(p)(!__isthreaded ? __sfileno(p) : (fileno)(p)) > >> > >>so one of the two functions will be used depending on __isthreaded >

Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-05-08 Thread Junio C Hamano
Dan McGregor writes: >>I don't think this is enough. At least fbsd defines this >> >>#definefileno(p)(!__isthreaded ? __sfileno(p) : (fileno)(p)) >> >>so one of the two functions will be used depending on __isthreaded >>flag. Your forcing to use fileno, ignoring __sfileno, is technically

Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-02-15 Thread Dan McGregor
On February 12, 2019 7:45:37 a.m. CST, Duy Nguyen wrote: >On Fri, Feb 08, 2019 at 08:36:21PM -0600, Dan McGregor wrote: >> Commit 8dd2e88a92 ("http: support file handles for HTTP_KEEP_ERROR", >> 2019-01-10) introduced an implicit assumption that rewind, fileno, >and >> fflush are functions. At l

Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-02-12 Thread Junio C Hamano
Duy Nguyen writes: > So, how about something like this? A teeny bit longer than your > version, but I think it's easier to control long term. > > -- 8< -- > diff --git a/Makefile b/Makefile > index 0e13a5b469..44cfc63fc4 100644 > --- a/Makefile > +++ b/Makefile > @@ -433,6 +433,8 @@ all:: > # >

Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-02-12 Thread Duy Nguyen
On Tue, Feb 12, 2019 at 8:45 PM Duy Nguyen wrote: > > On Fri, Feb 08, 2019 at 08:36:21PM -0600, Dan McGregor wrote: > > Commit 8dd2e88a92 ("http: support file handles for HTTP_KEEP_ERROR", > > 2019-01-10) introduced an implicit assumption that rewind, fileno, and > > fflush are functions. At least

Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-02-12 Thread Duy Nguyen
On Fri, Feb 08, 2019 at 08:36:21PM -0600, Dan McGregor wrote: > Commit 8dd2e88a92 ("http: support file handles for HTTP_KEEP_ERROR", > 2019-01-10) introduced an implicit assumption that rewind, fileno, and > fflush are functions. At least on FreeBSD fileno is not, and as such > passing a void * fai

Re: [PATCH v2] git-compat-util: undefine fileno if defined

2019-02-09 Thread Junio C Hamano
Dan McGregor writes: > Commit 8dd2e88a92 ("http: support file handles for HTTP_KEEP_ERROR", > 2019-01-10) introduced an implicit assumption that rewind, fileno, and > fflush are functions. At least on FreeBSD fileno is not, and as such > passing a void * failed. > > All systems tested (FreeBSD an

[PATCH v2] git-compat-util: undefine fileno if defined

2019-02-08 Thread Dan McGregor
Commit 8dd2e88a92 ("http: support file handles for HTTP_KEEP_ERROR", 2019-01-10) introduced an implicit assumption that rewind, fileno, and fflush are functions. At least on FreeBSD fileno is not, and as such passing a void * failed. All systems tested (FreeBSD and NetBSD) that define fineo as a m