• warning: implicit declaration of function =?utf-8?B?4oCYbWtz?= =?ut

    From Richard Kettlewell@21:1/5 to Philipp Klaus Krause on Thu Aug 3 11:08:10 2017
    Philipp Klaus Krause <pkk@spth.de> writes:
    When using mkstemp() in my C source, I get the gcc warning:

    warning: implicit declaration of function ‘mkstemp’

    Why?
    I use gcc 6.4.0 on a debian GNU/Linux system.
    <stdlib.h> is included. I use other POSIX functions (such as
    ftruncate() and open()) that are not part of ISO C in the same source
    file, but get a warning for mkstemp() only.
    I tried using -D_POSIX_C_SOURCE=200112L, but still get the warning.

    WFM on an up-to-date sid install. What’s your test case?

    --
    http://www.greenend.org.uk/rjk/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Philipp Klaus Krause@21:1/5 to All on Thu Aug 3 12:30:03 2017
    Am 03.08.2017 um 12:08 schrieb Richard Kettlewell:
    Philipp Klaus Krause <pkk@spth.de> writes:
    When using mkstemp() in my C source, I get the gcc warning:

    warning: implicit declaration of function ‘mkstemp’

    Why?
    I use gcc 6.4.0 on a debian GNU/Linux system.
    <stdlib.h> is included. I use other POSIX functions (such as
    ftruncate() and open()) that are not part of ISO C in the same source
    file, but get a warning for mkstemp() only.
    I tried using -D_POSIX_C_SOURCE=200112L, but still get the warning.

    WFM on an up-to-date sid install. What’s your test case?


    Sorry for the noise. I just checked again, and I mistook the <stdio.h>
    include for <stdlib.h> earlier. With the correct include, the warning is
    gone.

    Philipp

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)