.B #define _GNU_SOURCE
.B #include <sched.h>
.P
-.BI "int clone(int (*" "fn" ")(void *_Nullable), void *" stack \
-", int " flags ,
-.BI " void *_Nullable " "arg" ", ..." \
-" \fR/*\fP" " pid_t *_Nullable " parent_tid ,
-.BI " void *_Nullable " tls ,
-.BI " pid_t *_Nullable " child_tid " \fR*/\fP );"
+.BI "int clone(typeof(int (void *_Nullable)) *" fn ,
+.BI " void *" stack ,
+.BI " int " flags ,
+.BI " void *_Nullable " arg ", ..."
+.BI " \f[R]/*\f[] pid_t *_Nullable " parent_tid ,
+.BI " void *_Nullable " tls ,
+.BI " pid_t *_Nullable " child_tid " \f[R]*/\f[] );"
.P
/* For the prototype of the raw clone() system call, see VERSIONS. */
.P
.nf
.B #include <signal.h>
.P
-.B typedef void (*sighandler_t)(int);
+.B "typedef typeof(void (int)) *sighandler_t;"
.P
.BI "sighandler_t signal(int " signum ", sighandler_t " handler );
.fi
.nf
.B #include <stdlib.h>
.P
-.BI "int atexit(void (*" function )(void));
+.BI "int atexit(typeof(void (void)) *" function );
.fi
.SH DESCRIPTION
The
.nf
.B #include <signal.h>
.P
-.B typedef void (*sighandler_t)(int);
+.B "typedef typeof(void (int)) *sighandler_t;"
.P
.BI "sighandler_t bsd_signal(int " signum ", sighandler_t " handler );
.fi
.BI "void *bsearch(const void " key [. size "], \
const void " base [. size " * ." n ],
.BI " size_t " n ", size_t " size ,
-.BI " int (*" compar ")(const void [." size "], \
-const void [." size ]));
+.BI " typeof(int (const void [." size "], const void [." size ]))
+.BI " *" compar );
.fi
.SH DESCRIPTION
The
.B #include <link.h>
.P
.B int dl_iterate_phdr(
-.BI " int (*" callback ")(struct dl_phdr_info *" info ,
-.BI " size_t " size ", void *" data ),
-.BI " void *" data );
+.BI " typeof(int (struct dl_phdr_info *" info ", size_t " size ", void *" data ))
+.BI " *" callback ,
+.BI " void *" data );
.fi
.SH DESCRIPTION
The
.BI "extern unsigned int " error_message_count ;
.BI "extern int " error_one_per_line ;
.P
-.BI "extern void (*" error_print_progname ")(void);"
+.BI "extern typeof(void (void)) *" error_print_progname ;
.fi
.SH DESCRIPTION
.BR error ()
.B #include <fts.h>
.P
.BI "FTS *fts_open(char *const *" path_argv ", int " options ,
-.BI " int (*_Nullable " compar ")(const FTSENT **, const FTSENT **));"
+.B " typeof(int (const FTSENT **, const FTSENT **))"
+.BI " *_Nullable " compar );
.P
.BI "FTSENT *fts_read(FTS *" ftsp );
.P
.B #include <ftw.h>
.P
.BI "int nftw(const char *" dirpath ,
-.BI " int (*" fn ")(const char *" fpath ", const struct stat *" sb ,
-.BI " int " typeflag ", struct FTW *" ftwbuf ),
+.BI " typeof(int (const char *" fpath ", const struct stat *" sb,
+.BI " int " typeflag ", struct FTW *" ftwbuf ))
+.BI " *" fn,
.BI " int " nopenfd ", int " flags );
.P
.B [[deprecated]]
.BI "int ftw(const char *" dirpath ,
-.BI " int (*" fn ")(const char *" fpath ", const struct stat *" sb ,
-.BI " int " typeflag ),
+.BI " typeof(int (const char *" fpath ", const struct stat *" sb ,
+.BI " int " typeflag ))
+.BI " *" fn,
.BI " int " nopenfd );
.fi
.P
.B #include <glob.h>
.P
.BI "int glob(const char *restrict " pattern ", int " flags ,
-.BI " int (*" errfunc ")(const char *" epath ", int " eerrno ),
+.BI " typeof(int (const char *" epath ", int " eerrno ")) *" errfunc ,
.BI " glob_t *restrict " pglob );
.BI "void globfree(glob_t *" pglob );
.fi
.nf
.B #include <signal.h>
.P
-.B typedef void (*sighandler_t)(int);
+.B "typedef typeof(void (int)) *sighandler_t;"
.P
.BI "[[deprecated]] int gsignal(int " signum );
.P
.BI "void *lfind(const void " key [. size "], \
const void " base [*. n " * ." size ],
.BI " size_t *" n ", size_t " size ,
-.BI " int(*" compar ")(const void [." size "], \
-const void [." size ]));
+.BI " typeof(int (const void [." size "], const void [." size ]))
+.BI " *" compar );
.BI "void *lsearch(const void " key [. size "], \
void " base [*. n " * ." size ],
.BI " size_t *" n ", size_t " size ,
-.BI " int(*" compar ")(const void [." size "], \
-const void [." size ]));
+.BI " typeof(int (const void [." size "], const void [." size ]))
+.BI " *" compar );
.fi
.SH DESCRIPTION
.BR lfind ()
.nf
.B #include <ucontext.h>
.P
-.BI "void makecontext(ucontext_t *" ucp ", void (*" func ")(int " arg0 ", ...),"
+.BI "void makecontext(ucontext_t *" ucp ", typeof(void (int " arg0 ", ...)) *" func ,
.BI " int " argc ", ...);"
.BI "int swapcontext(ucontext_t *restrict " oucp ,
.BI " const ucontext_t *restrict " ucp );
.nf
.B "#include <malloc.h>"
.P
-.BI "void *(*volatile __malloc_hook)(size_t " size ", const void *" caller );
+.BI "typeof(void *(size_t " size ", const void *" caller ))
+.B " *volatile __malloc_hook;"
.P
-.BI "void *(*volatile __realloc_hook)(void *" ptr ", size_t " size ,
-.BI " const void *" caller );
+.BI "typeof(void *(void *" p ", size_t " size ", const void *" caller ))
+.B " *volatile __realloc_hook;"
.P
-.BI "void *(*volatile __memalign_hook)(size_t " alignment ", size_t " size ,
-.BI " const void *" caller );
+.BI "typeof(void *(size_t " align ", size_t " size ", const void *" caller ))
+.B " *volatile __memalign_hook;"
.P
-.BI "void (*volatile __free_hook)(void *" ptr ", const void *" caller );
+.BI "typeof(void *(void *" p ", const void *" caller ))
+.B " *volatile __free_hook;"
.P
-.B "void (*__malloc_initialize_hook)(void);"
-.P
-.B "void (*volatile __after_morecore_hook)(void);"
+.B "typeof(void (void)) *__malloc_initialize_hook;"
+.B "typeof(void (void)) *volatile __after_mrecore_hook;"
.fi
.SH DESCRIPTION
The GNU C library lets you modify the behavior of
.nf
.B #include <mcheck.h>
.P
-.BI "int mcheck(void (*" abortfunc ")(enum mcheck_status " mstatus ));
-.BI "int mcheck_pedantic(void (*" abortfunc ")(enum mcheck_status " mstatus ));
+.BI "int mcheck(typeof(void (enum mcheck_status " mstatus ")) *" abortfunc );
+.B "int mcheck_pedantic("
+.BI " typeof(void (enum mcheck_status " mstatus ")) *" abortfunc );
.B void mcheck_check_all(void);
.P
.BI "enum mcheck_status mprobe(void *" ptr );
.BI "MPOOL *mpool_open(DBT *" key ", int " fd ", pgno_t " pagesize \
", pgno_t " maxcache );
.P
-.BI "void mpool_filter(MPOOL *" mp ", void (*pgin)(void *, pgno_t, void *),"
-.BI " void (*" pgout ")(void *, pgno_t, void *),"
+.BI "void mpool_filter(MPOOL *" mp ,
+.BI " typeof(void (void *, pgno_t, void *)) *" pgin ,
+.BI " typeof(void (void *, pgno_t, void *)) *" pgout ,
.BI " void *" pgcookie );
.P
.BI "void *mpool_new(MPOOL *" mp ", pgno_t *" pgnoaddr );
.nf
.B #include <stdlib.h>
.P
-.BI "int on_exit(void (*" function ")(int, void *), void *" arg );
+.BI "int on_exit(typeof(void (int, void *)) *" function ", void *" arg );
.fi
.P
.RS -4
.nf
.B #include <pthread.h>
.P
-.BI "int pthread_atfork(void (*" prepare ")(void), void (*" parent ")(void),"
-.BI " void (*" child ")(void));"
+.BI "int pthread_atfork(typeof(void (void)) *" prepare ,
+.BI " typeof(void (void)) *" parent ,
+.BI " typeof(void (void)) *" child );
.fi
.SH DESCRIPTION
The
.nf
.B #include <pthread.h>
.P
-.BI "void pthread_cleanup_push(void (*" routine ")(void *), void *" arg );
+.BI "void pthread_cleanup_push(typeof(void (void *)) *" routine ", void *" arg );
.BI "void pthread_cleanup_pop(int " execute );
.fi
.SH DESCRIPTION
.nf
.B #include <pthread.h>
.P
-.BI "void pthread_cleanup_push_defer_np(void (*" routine ")(void *), void *" arg );
+.BI "void pthread_cleanup_push_defer_np(typeof(void (void *)) *" routine ,
+.BI " void *" arg );
.BI "void pthread_cleanup_pop_restore_np(int " execute );
.fi
.P
.P
.BI "int pthread_create(pthread_t *restrict " thread ,
.BI " const pthread_attr_t *restrict " attr ,
-.BI " void *(*" start_routine ")(void *),"
+.BI " typeof(void *(void *)) *" start_routine ,
.BI " void *restrict " arg );
.fi
.SH DESCRIPTION
.P
.BI "void qsort(void " base [. size " * ." n "], size_t " n ", \
size_t " size ,
-.BI " int (*" compar ")(const void [." size "], \
-const void [." size ]));
+.BI " typeof(int (const void [." size "], const void [." size "]))"
+.BI " *" compar );
.BI "void qsort_r(void " base [. size " * ." n "], size_t " n ", \
size_t " size ,
-.BI " int (*" compar ")(const void [." size "], \
-const void [." size "], void *),"
+.BI " typeof(int (const void [." size "], const void [." size "], void *))"
+.BI " *" compar ,
.BI " void *" arg ");"
.fi
.P
.P
.BI "int scandir(const char *restrict " dirp ,
.BI " struct dirent ***restrict " namelist ,
-.BI " int (*" filter ")(const struct dirent *),"
-.BI " int (*" compar ")(const struct dirent **,"
-.B " const struct dirent **));"
+.BI " typeof(int (const struct dirent *)) *" filter ,
+.B " typeof(int (const struct dirent **, const struct dirent **))"
+.BI " *" compar );
.P
.BI "int alphasort(const struct dirent **" a ", const struct dirent **" b );
.BI "int versionsort(const struct dirent **" a ", const struct dirent **" b );
.P
.BI "int scandirat(int " dirfd ", const char *restrict " dirp ,
.BI " struct dirent ***restrict " namelist ,
-.BI " int (*" filter ")(const struct dirent *),"
-.BI " int (*" compar ")(const struct dirent **,"
-.B " const struct dirent **));"
+.BI " typeof(int (const struct dirent *)) *" filter ,
+.B " typeof(int (const struct dirent **, const struct dirent **))"
+.BI " *" compar );
.fi
.P
.RS -4
.nf
.B #include <signal.h>
.P
-.B typedef void (*sighandler_t)(int);
+.B "typedef typeof(void (int)) *sighandler_t;"
.P
.BI "[[deprecated]] sighandler_t sigset(int " sig ", sighandler_t " disp );
.P
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <signal.h>
.P
-.B typedef void (*sighandler_t)(int);
+.B "typedef typeof(void (int)) *sighandler_t;"
.P
.BI "sighandler_t sysv_signal(int " signum ", sighandler_t " handler );
.fi
.P
.B typedef enum { preorder, postorder, endorder, leaf } VISIT;
.P
-.BI "void *tsearch(const void *" key ", void **" rootp ,
-.BI " int (*" compar ")(const void *, const void *));"
.BI "void *tfind(const void *" key ", void *const *" rootp ,
-.BI " int (*" compar ")(const void *, const void *));"
+.BI " typeof(int (const void *, const void *)) *" compar );
+.BI "void *tsearch(const void *" key ", void **" rootp ,
+.BI " typeof(int (const void *, const void *)) *" compar );
.BI "void *tdelete(const void *restrict " key ", void **restrict " rootp ,
-.BI " int (*" compar ")(const void *, const void *));"
+.BI " typeof(int (const void *, const void *)) *" compar );
.BI "void twalk(const void *" root ,
-.BI " void (*" action ")(const void *" nodep ", VISIT " which ,
-.BI " int " depth ));
+.BI " typeof(void (const void *" nodep ", VISIT " which ", int " depth ))
+.BI " *" action );
.P
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <search.h>
.P
.BI "void twalk_r(const void *" root ,
-.BI " void (*" action ")(const void *" nodep ", VISIT " which ,
-.BI " void *" closure ),
-.BI " void *" closure );
-.BI "void tdestroy(void *" root ", void (*" free_node ")(void *" nodep ));
+.BI " typeof(void (const void *" nodep ", VISIT " which ", void *" closure ))
+.BI " *" action ,
+.BI " void *" closure );
+.BI "void tdestroy(void *" root ,
+.BI " typeof(void (void *" nodep ")) *" free_node );
.fi
.SH DESCRIPTION
.BR tsearch (),
.BR " int sigev_signo;" " /* Signal number */"
.BR " union sigval sigev_value;" " /* Data passed with notification */"
\&
-.B " void (*sigev_notify_function)(union sigval);"
+.B " typeof(void (union sigval)) *sigev_notify_function;"
.BR " " " /* Notification function"
.BR " " " (SIGEV_THREAD) */"
.B " pthread_attr_t *sigev_notify_attributes;"