One problem with a "provide decl" check is that different systems need
different declarations for the same function.
This isn't good, but it's reality.
As a worst case, I remember versions of IRIX that declared main() in a
unique way; If main was declared with a normal prototype, the code would
not compile.
While it's no fun, the NTP configure.in does things like this:
case "$target" in
changequote(<<, >>)dnl
*-*-osf[45]*)
changequote([, ])dnl
AC_DEFINE(DECL_PLOCK_0)
AC_DEFINE(DECL_STIME_1)
;;
*-*-riscos4*)
AC_DEFINE(DECL_ADJTIME_0)
AC_DEFINE(DECL_BZERO_0)
AC_DEFINE(DECL_IOCTL_0)
AC_DEFINE(DECL_IPC_0)
AC_DEFINE(DECL_MEMMOVE_0)
...
acconfig.h has things like:
/* setitimer()? */
#undef DECL_SETITIMER_0
/* setpriority()? */
#undef DECL_SETPRIORITY_0
#undef DECL_SETPRIORITY_1
and one of the distribution headers contains lines like:
#ifdef DECL_SETPRIORITY_0
extern int setpriority P((int, int, int));
#endif
#ifdef DECL_SETPRIORITY_1
extern int setpriority P((int, id_t, int));
#endif
H