Macro: ac_prototype_setsockopt

Back to the Main Page. | Download the M4 Source.

# ac_prototype_setsockopt

## Synopsis

`AC_PROTOTYPE_SETSOCKOPT`

## Version

1.1.1.1 (2001/07/26) Miscellaneous @ ac-archive-0.5.32

## Author

Loic Dachary <loic@senga.org>

## Description

Requires the AC_PROTOTYPE macro.

Find the type of argument three of setsockopt. User must include the following in acconfig.h:

/* Type of third argument of setsockopt */ #undef SETSOCKOPT_ARG3

## M4 Source Code

    AC_DEFUN([AC_PROTOTYPE_SETSOCKOPT],[
    AC_PROTOTYPE(setsockopt,
     [
      #include <sys/types.h>
      #include <sys/socket.h>
     ],
     [
      int a = 0;
      ARG3 b = 0;
      setsockopt(a, SOL_SOCKET, SO_REUSEADDR, b, sizeof(a));
     ],
     ARG3, [const void*, const char*, void*, char*])
    ])