cmake check_prototype_definition() examples

FirebirdSQL/firebird builds/cmake/Configure.cmake :294

check_prototype_definition(
    gettimeofday
    "int gettimeofday(struct timeval *tv, ${TIMEZONE_TYPE} *tz)"
    0
    "sys/time.h"
    GETTIMEOFDAY_RETURNS_TIMEZONE
)

FirebirdSQL/firebird builds/cmake/Configure.cmake :302

check_prototype_definition(
    getmntent
    "int getmntent(FILE *file, struct mnttab *mptr)"
    0
    mntent.h
    GETMNTENT_TAKES_TWO_ARGUMENTS
)

libevent/libevent CMakeLists.txt :520

CHECK_PROTOTYPE_DEFINITION(gethostbyname_r
    "int gethostbyname_r(const char *name, struct hostent *hp, struct hostent_data *hdata)"
    "0"
    "netdb.h"
    EVENT__HAVE_GETHOSTBYNAME_R_3_ARG)

libevent/libevent CMakeLists.txt :526

CHECK_PROTOTYPE_DEFINITION(gethostbyname_r
    "struct hostent *gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, int *herr)"
    "NULL"
    "netdb.h"
    EVENT__HAVE_GETHOSTBYNAME_R_5_ARG)

libevent/libevent CMakeLists.txt :532

CHECK_PROTOTYPE_DEFINITION(gethostbyname_r
    "int gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, struct hostent **result, int *herr)"
    "0"
    "netdb.h"
    EVENT__HAVE_GETHOSTBYNAME_R_6_ARG)

libevent/libevent cmake/CheckPrototypeDefinition.cmake :2

# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)

libevent/libevent cmake/CheckPrototypeDefinition.cmake :12

# check_prototype_definition(getpwent_r
#     "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
#     "NULL"
#     "unistd.h;pwd.h"
#     SOLARIS_GETPWENT_R)

libgit2/libgit2 cmake/CheckPrototypeDefinitionSafe.cmake :12

check_prototype_definition("${function}" "${prototype}" "${return}" "${header}" "${variable}")

wxWidgets/wxWidgets build/cmake/setup.cmake :371

check_prototype_definition(gethostbyname_r
    "int gethostbyname_r(const char *name, struct hostent *hp, struct hostent_data *hdata)"
    "0"
    "netdb.h"
    HAVE_FUNC_GETHOSTBYNAME_R_3)

wxWidgets/wxWidgets build/cmake/setup.cmake :377

check_prototype_definition(gethostbyname_r
    "struct hostent *gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, int *herr)"
    "NULL"
    "netdb.h"
    HAVE_FUNC_GETHOSTBYNAME_R_5)

wxWidgets/wxWidgets build/cmake/setup.cmake :383

check_prototype_definition(gethostbyname_r
    "int gethostbyname_r(const char *name, struct hostent *hp, char *buf, size_t buflen, struct hostent **result, int *herr)"
    "0"
    "netdb.h"
    HAVE_FUNC_GETHOSTBYNAME_R_6)