Wireshark mailing list archives

Re: [Wireshark-commits] master b736896: Handle floorl() the same way we handle other not-on-all-platforms functions.


From: Guy Harris <guy () alum mit edu>
Date: Fri, 19 Dec 2014 20:18:59 -0800


On Dec 19, 2014, at 7:08 PM, Stephen Fisher <sfisher () SDF ORG> wrote:

Thanks for correcting this.  I see now that there are other functions 
defined the way you re-defined floorl().  The example I randomly picked 
to follow was wsutil/tempfile.[ch], which is done with just 
AC_CHECK_FUNCS() and #ifndef HAVE_MKSTEMP.  Does that need to be 
corrected too then?

That one's more complicated, as tempfile.c has:

        a substitute version of mkstemp();

        a substitute version of mkdtemp();

        two routines that use them and that *aren't* part of any OS or language support library API;

so to do it the same way we'd have:

        mkstemp.c, with a substitute version of mkstemp();

        mkdtemp.c, with a substitute version of mkdtemp();

        tempfile.c, with the routines that use them.d

However, as we don't export our substitute versions of mkstemp() and mkdtemp(), and don't use them elsewhere in 
Wireshark (we use the routines exported by tempfile.c, instead), an alternative is to make mkdtemp() static to 
tempfile.c and otherwise leave it as it is, where if HAVE_MK[DS]TEMP is *not* defined, it defines a local version of 
mk[ds]temp().

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: