Hi Phil, As long as anyone using png.h also includes pngpriv, it's not a problem.
If you don't include pngpriv, the pre-process output resolves the extern lines to be extern PNG_DLL_EXPORT [function] because it appears to use the string literally if the macro hasn't been defined. Right now this isn't a bug, just a quirk I was mentioning. Best Regards Adam Farley Phil Race <philip.r...@oracle.com> wrote on 30/05/2018 18:07:39: > From: Phil Race <philip.r...@oracle.com> > To: Adam Farley8 <adam.far...@uk.ibm.com> > Cc: 2d-dev <2d-dev@openjdk.java.net> > Date: 30/05/2018 18:08 > Subject: Re: [OpenJDK 2D-Dev] Question about splashscreen lib > > I think PNG_DLL_EXPORT is not intended to be used directly. > I am not sure what problem this causes but it is just the way this > library is written ... > > -phil. > On 05/30/2018 04:16 AM, Adam Farley8 wrote: > Thanks Philip. > > The whole thing with PNG_DLL_EXPORT not being defined in png.h or > png.c is still confusing to me > (pngpriv defines it), especially since png.h ends up using it post- > pre-processing, but I don't know if > that would bother people outside the minority that inspect the pre- > processed code. > > I'll leave this here as a thought for any committer bothered by > this, though I won't be pushing it. > > ---- png.h ---- > + #ifndef PNG_DLL_EXPORT > + #define PNG_DLL_EXPORT > + #endif > > Best Regards > > Adam Farley > > > Philip Race <philip.r...@oracle.com> wrote on 29/05/2018 14:23:21: > > > From: Philip Race <philip.r...@oracle.com> > > To: Adam Farley8 <adam.far...@uk.ibm.com> > > Cc: 2d-dev <2d-dev@openjdk.java.net> > > Date: 29/05/2018 14:23 > > Subject: Re: [OpenJDK 2D-Dev] Question about splashscreen lib > > > > So far as I can see it does, just indirectly. > > png.c includes pngpriv.h which includes png.h > > > > Not including the declarations of the exported API in the file that > > defines them would be a problem waiting to happen. > > > > -phil. > > > > On 5/29/18, 3:54 AM, Adam Farley8 wrote: > > Hi All, > > > > Does anyone know why png.c does not include png.h? > > > > This tripped me up recently, and I don't understand why png.c would > > not include png.h. > > > > Best Regards > > > > Adam Farley > > > > Unless stated otherwise above: > > IBM United Kingdom Limited - Registered in England and Wales with > > number 741598. > > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU > Unless stated otherwise above: > IBM United Kingdom Limited - Registered in England and Wales with > number 741598. > Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU