From 4174d499fe105c6d8bd76d265e28e07f0db08b55 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 16 Apr 2018 15:30:27 +0200 Subject: [PATCH] we're supposed to parse all that ourselves --- config.m4 | 50 +----- m4/posix/arpa_inet.m4 | 11 -- m4/posix/errno.m4 | 86 ---------- m4/posix/fcntl.m4 | 71 -------- m4/posix/glob.m4 | 30 ---- m4/posix/locale.m4 | 54 ------ m4/posix/ndbm.m4 | 27 --- m4/posix/netdb.m4 | 108 ------------ m4/posix/netinet_in.m4 | 65 ------- m4/posix/netinet_tcp.m4 | 3 - m4/posix/poll.m4 | 23 --- m4/posix/signal.m4 | 186 -------------------- m4/posix/stdarg.m4 | 4 - m4/posix/stddef.m4 | 24 --- m4/posix/stdint.m4 | 78 --------- m4/posix/stdio.m4 | 85 --------- m4/posix/stdlib.m4 | 76 --------- m4/posix/sys_select.m4 | 15 -- m4/posix/sys_socket.m4 | 91 ---------- m4/posix/sys_stat.m4 | 84 --------- m4/posix/sys_time.m4 | 23 --- m4/posix/sys_times.m4 | 11 -- m4/posix/sys_types.m4 | 24 --- m4/posix/sys_uio.m4 | 10 -- m4/posix/sys_utsname.m4 | 13 -- m4/posix/syslog.m4 | 41 ----- m4/posix/time.m4 | 62 ------- m4/posix/unistd.m4 | 369 ---------------------------------------- m4/posix/wchar.m4 | 78 --------- m4/posix/wctype.m4 | 41 ----- m4/psi/psi.m4 | 151 ---------------- m4/psi/psi_composite.m4 | 77 --------- m4/psi/psi_decl.m4 | 128 -------------- m4/psi/psi_macro.m4 | 70 -------- php_psi_posix.h.in | 47 ----- 35 files changed, 2 insertions(+), 2314 deletions(-) delete mode 100644 m4/posix/arpa_inet.m4 delete mode 100644 m4/posix/errno.m4 delete mode 100644 m4/posix/fcntl.m4 delete mode 100644 m4/posix/glob.m4 delete mode 100644 m4/posix/locale.m4 delete mode 100644 m4/posix/ndbm.m4 delete mode 100644 m4/posix/netdb.m4 delete mode 100644 m4/posix/netinet_in.m4 delete mode 100644 m4/posix/netinet_tcp.m4 delete mode 100644 m4/posix/poll.m4 delete mode 100644 m4/posix/signal.m4 delete mode 100644 m4/posix/stdarg.m4 delete mode 100644 m4/posix/stddef.m4 delete mode 100644 m4/posix/stdint.m4 delete mode 100644 m4/posix/stdio.m4 delete mode 100644 m4/posix/stdlib.m4 delete mode 100644 m4/posix/sys_select.m4 delete mode 100644 m4/posix/sys_socket.m4 delete mode 100644 m4/posix/sys_stat.m4 delete mode 100644 m4/posix/sys_time.m4 delete mode 100644 m4/posix/sys_times.m4 delete mode 100644 m4/posix/sys_types.m4 delete mode 100644 m4/posix/sys_uio.m4 delete mode 100644 m4/posix/sys_utsname.m4 delete mode 100644 m4/posix/syslog.m4 delete mode 100644 m4/posix/time.m4 delete mode 100644 m4/posix/unistd.m4 delete mode 100644 m4/posix/wchar.m4 delete mode 100644 m4/posix/wctype.m4 delete mode 100644 m4/psi/psi_composite.m4 delete mode 100644 m4/psi/psi_decl.m4 delete mode 100644 m4/psi/psi_macro.m4 diff --git a/config.m4 b/config.m4 index a8c95b0..4bf96d4 100644 --- a/config.m4 +++ b/config.m4 @@ -11,40 +11,8 @@ m4_foreach(incfile, [ [ax/ax_check_sign.m4], [ax/ax_pthread.m4], [psi/psi.m4], - [psi/psi_type.m4], [psi/psi_const.m4], - [psi/psi_decl.m4], - [psi/psi_macro.m4], - [psi/psi_composite.m4], - [posix/arpa_inet.m4], - [posix/errno.m4], - [posix/fcntl.m4], - [posix/glob.m4], - [posix/locale.m4], - [posix/stddef.m4], - [posix/stdio.m4], - [posix/stdint.m4], - [posix/stdlib.m4], - [posix/stdarg.m4], - [posix/sys_select.m4], - [posix/sys_socket.m4], - [posix/sys_stat.m4], - [posix/sys_time.m4], - [posix/sys_times.m4], - [posix/sys_types.m4], - [posix/sys_uio.m4], - [posix/sys_utsname.m4], - [posix/ndbm.m4], - [posix/netdb.m4], - [posix/netinet_in.m4], - [posix/netinet_tcp.m4], - [posix/poll.m4], - [posix/signal.m4], - [posix/syslog.m4], - [posix/time.m4], - [posix/unistd.m4], - [posix/wchar.m4], - [posix/wctype.m4]], [ + [psi/psi_type.m4]], [ dnl pecl build sinclude([m4/]incfile) dnl php-src build @@ -55,9 +23,7 @@ PHP_ARG_ENABLE(psi, whether to enable PHP System Interface support, [ --enable-psi Enable PSI (PHP System Interface) support]) if test "$PHP_PSI" != no; then - PHP_ARG_ENABLE(psi-posix, whether to pre-define POSIX decls, - [ --enable-psi-posix=... PSI: pre-define POSIX decls], [all], [no]) - + PHP_ARG_ENABLE(psi-maintainer-mode, whether to enable maintainer mode, [ --enable-psi-maintainer-mode PSI: enable maintainer mode @@ -99,19 +65,7 @@ if test "$PHP_PSI" != no; then AC_FUNC_MMAP PSI_CONFIG_INIT - - dnl basics, one-by-one PSI_CHECK_STD_TYPES - PSI_CHECK_STDINT - PSI_CHECK_SYS_TYPES - PSI_CHECK_STDDEF - - dnl parallel - AC_MSG_CHECKING([for POSIX modules]) - if ! $PSI_FAST_CONFIG; then - AC_MSG_RESULT([$PHP_PSI_POSIX]) - fi - PSI_CONFIG_DONE PHP_SUBST(PSI_SHARED_LIBADD) diff --git a/m4/posix/arpa_inet.m4 b/m4/posix/arpa_inet.m4 deleted file mode 100644 index 6473607..0000000 --- a/m4/posix/arpa_inet.m4 +++ /dev/null @@ -1,11 +0,0 @@ -PSI_CHECK_ARPA_INET() { - PSI_DECL(uint32_t htonl, [(uint32_t l)]) - PSI_DECL(uint16_t htons, [(uint16_t s)]) - PSI_DECL(uint32_t ntohl, [(uint32_t l)]) - PSI_DECL(uint16_t ntohs, [(uint16_t s)]) - - PSI_DECL(in_addr_t inet_addr, [(const char *cp)]) - PSI_DECL(char *inet_ntoa, [(struct in_addr in)]) - PSI_DECL(const char *inet_ntop, [(int af, const void *src, char *dst, socklen_t size)]) - PSI_DECL(int inet_pton, [(int af, const char *src, void *dst)]) -} \ No newline at end of file diff --git a/m4/posix/errno.m4 b/m4/posix/errno.m4 deleted file mode 100644 index 540918d..0000000 --- a/m4/posix/errno.m4 +++ /dev/null @@ -1,86 +0,0 @@ -PSI_CHECK_ERRNO() { - - PSI_EXTVAR(int errno) - - PSI_CONST(E2BIG, int) - PSI_CONST(EACCES, int) - PSI_CONST(EADDRINUSE, int) - PSI_CONST(EADDRNOTAVAIL, int) - PSI_CONST(EAFNOSUPPORT, int) - PSI_CONST(EAGAIN, int) - PSI_CONST(EALREADY, int) - PSI_CONST(EBADF, int) - PSI_CONST(EBADMSG, int) - PSI_CONST(EBUSY, int) - PSI_CONST(ECANCELED, int) - PSI_CONST(ECHILD, int) - PSI_CONST(ECONNABORTED, int) - PSI_CONST(ECONNREFUSED, int) - PSI_CONST(ECONNRESET, int) - PSI_CONST(EDEADLK, int) - PSI_CONST(EDESTADDRREQ, int) - PSI_CONST(EDOM, int) - PSI_CONST(EDQUOT, int) - PSI_CONST(EEXIST, int) - PSI_CONST(EFAULT, int) - PSI_CONST(EFBIG, int) - PSI_CONST(EHOSTUNREACH, int) - PSI_CONST(EIDRM, int) - PSI_CONST(EILSEQ, int) - PSI_CONST(EINPROGRESS, int) - PSI_CONST(EINTR, int) - PSI_CONST(EINVAL, int) - PSI_CONST(EIO, int) - PSI_CONST(EISCONN, int) - PSI_CONST(EISDIR, int) - PSI_CONST(ELOOP, int) - PSI_CONST(EMFILE, int) - PSI_CONST(EMLINK, int) - PSI_CONST(EMSGSIZE, int) - PSI_CONST(EMULTIHOP, int) - PSI_CONST(ENAMETOOLONG, int) - PSI_CONST(ENETDOWN, int) - PSI_CONST(ENETRESET, int) - PSI_CONST(ENETUNREACH, int) - PSI_CONST(ENFILE, int) - PSI_CONST(ENOBUFS, int) - PSI_CONST(ENODATA, int) - PSI_CONST(ENODEV, int) - PSI_CONST(ENOENT, int) - PSI_CONST(ENOEXEC, int) - PSI_CONST(ENOLCK, int) - PSI_CONST(ENOLINK, int) - PSI_CONST(ENOMEM, int) - PSI_CONST(ENOMSG, int) - PSI_CONST(ENOPROTOOPT, int) - PSI_CONST(ENOSPC, int) - PSI_CONST(ENOSR, int) - PSI_CONST(ENOSTR, int) - PSI_CONST(ENOSYS, int) - PSI_CONST(ENOTCONN, int) - PSI_CONST(ENOTDIR, int) - PSI_CONST(ENOTEMPTY, int) - PSI_CONST(ENOTRECOVERABLE, int) - PSI_CONST(ENOTSOCK, int) - PSI_CONST(ENOTSUP, int) - PSI_CONST(ENOTTY, int) - PSI_CONST(ENXIO, int) - PSI_CONST(EOPNOTSUPP, int) - PSI_CONST(EOVERFLOW, int) - PSI_CONST(EOWNERDEAD, int) - PSI_CONST(EPERM, int) - PSI_CONST(EPIPE, int) - PSI_CONST(EPROTO, int) - PSI_CONST(EPROTONOSUPPORT, int) - PSI_CONST(EPROTOTYPE, int) - PSI_CONST(ERANGE, int) - PSI_CONST(EROFS, int) - PSI_CONST(ESPIPE, int) - PSI_CONST(ESRCH, int) - PSI_CONST(ESTALE, int) - PSI_CONST(ETIME, int) - PSI_CONST(ETIMEDOUT, int) - PSI_CONST(ETXTBSY, int) - PSI_CONST(EWOULDBLOCK, int) - PSI_CONST(EXDEV, int) -} diff --git a/m4/posix/fcntl.m4 b/m4/posix/fcntl.m4 deleted file mode 100644 index 0d35efa..0000000 --- a/m4/posix/fcntl.m4 +++ /dev/null @@ -1,71 +0,0 @@ -PSI_CHECK_FCNTL() { - PSI_CONST(F_DUPFD, int) - PSI_CONST(F_DUPFD_CLOEXEC, int) - PSI_CONST(F_GETFD, int) - PSI_CONST(F_SETFD, int) - PSI_CONST(F_GETFL, int) - PSI_CONST(F_SETFL, int) - PSI_CONST(F_GETLK, int) - PSI_CONST(F_SETLK, int) - PSI_CONST(F_SETLKW, int) - PSI_CONST(F_GETOWN, int) - PSI_CONST(F_SETOWN, int) - - PSI_CONST(FD_CLOEXEC, int) - - PSI_CONST(F_RDLCK, int) - PSI_CONST(F_UNLCK, int) - PSI_CONST(F_WRLCK, int) - - PSI_CONST(O_CLOEXEC, int) - PSI_CONST(O_CREAT, int) - PSI_CONST(O_DIRECTORY, int) - PSI_CONST(O_EXCL, int) - PSI_CONST(O_NOCTTY, int) - PSI_CONST(O_NOFOLLOW, int) - PSI_CONST(O_TRUNC, int) - PSI_CONST(O_TTY_INIT, int) - - PSI_CONST(O_APPEND, int) - PSI_CONST(O_DSYNC, int) - PSI_CONST(O_NONBLOCK, int) - PSI_CONST(O_RSYNC, int) - PSI_CONST(O_SYNC, int) - - PSI_CONST(O_ACCMODE, int) - - PSI_CONST(O_EXEC, int) - PSI_CONST(O_RDONLY, int) - PSI_CONST(O_RDWR, int) - PSI_CONST(O_SEARCH, int) - PSI_CONST(O_WRONLY, int) - - PSI_CONST(AT_FDCWD, int) - PSI_CONST(AT_EACCESS, int) - PSI_CONST(AT_SYMLINK_NOFOLLOW, int) - PSI_CONST(AT_SYMLINK_FOLLOW, int) - PSI_CONST(AT_REMOVEDIR, int) - - PSI_CONST(POSIX_FADV_DONTNEED, int) - PSI_CONST(POSIX_FADV_NOREUSE, int) - PSI_CONST(POSIX_FADV_NORMAL, int) - PSI_CONST(POSIX_FADV_RANDOM, int) - PSI_CONST(POSIX_FADV_SEQUENTUAL, int) - PSI_CONST(POSIX_FADV_WILLNEED, int) - - PSI_STRUCT(struct flock, [ - short l_type, - short l_whence, - off_t l_start, - off_t l_len, - pid_t l_pid] - ) - - PSI_DECL(int creat, [(const char *path, mode_t mode)]) - PSI_DECL(int fcntl, [(int fd, int cmd, mode_t mode)]) - PSI_DECL(int open, [(const char *path, int flags, mode_t mode)]) - PSI_DECL(int openat, [(int dirfd, const char *path, int flags, mode_t mode)]) - - PSI_DECL(int posix_fadvise, [(int fd, off_t offset, off_t len, int advice)]) - PSI_DECL(int posix_fallocate, [(int fd, off_t offset, off_t len)]) -} diff --git a/m4/posix/glob.m4 b/m4/posix/glob.m4 deleted file mode 100644 index 942428e..0000000 --- a/m4/posix/glob.m4 +++ /dev/null @@ -1,30 +0,0 @@ -PSI_CHECK_GLOB() { - - PSI_STRUCT(glob_t, [ - size_t gl_pathc, - int gl_matchc, - size_t gl_offs, - int gl_flags, - char **gl_pathv]) - - PSI_FUNCTOR_TYPE(int glob_err, [(const char *epath, int eerrno)]) - PSI_DECL(int glob, [(char *path, int flags, glob_err err, glob_t *buf)]) - PSI_DECL(void globfree, [(glob_t *buf)]) - - PSI_CONST(GLOB_APPEND, int) - PSI_CONST(GLOB_BRACE, int) - PSI_CONST(GLOB_DOOFFS, int) - PSI_CONST(GLOB_ERR, int) - PSI_CONST(GLOB_MARK, int) - PSI_CONST(GLOB_NOCHECK, int) - PSI_CONST(GLOB_NOESCAPE, int) - PSI_CONST(GLOB_NOMAGIC, int) - PSI_CONST(GLOB_NOSORT, int) - PSI_CONST(GLOB_ONLYDIR, int) - PSI_CONST(GLOB_PERIOD, int) - PSI_CONST(GLOB_TILDE, int) - PSI_CONST(GLOB_TILDE_CHECK, int) - PSI_CONST(GLOB_ABORTED, int) - PSI_CONST(GLOB_NOMATCH, int) - PSI_CONST(GLOB_NOSPACE, int) -} diff --git a/m4/posix/locale.m4 b/m4/posix/locale.m4 deleted file mode 100644 index 64cd66f..0000000 --- a/m4/posix/locale.m4 +++ /dev/null @@ -1,54 +0,0 @@ -PSI_CHECK_LOCALE() { - PSI_STRUCT(struct lconv, [ - char *currency_symbol, - char *decimal_point, - char frac_digits, - char *grouping, - char *int_curr_symbol, - char int_frac_digits, - char int_n_cs_precedes, - char int_n_sep_by_space, - char int_n_sign_posn, - char int_p_cs_precedes, - char int_p_sep_by_space, - char int_p_sign_posn, - char *mon_decimal_point, - char *mon_grouping, - char *mon_thousands_sep, - char *negative_sign, - char n_cs_precedes, - char n_sep_by_space, - char n_sign_posn, - char *positive_sign, - char p_cs_precedes, - char p_sep_by_space, - char p_sign_posn, - char *thousands_sep]) - - PSI_CONST(LC_ALL, int) - PSI_CONST(LC_COLLATE, int) - PSI_CONST(LC_CTYPE, int) - PSI_CONST(LC_MESSAGES, int) - PSI_CONST(LC_MONETARY, int) - PSI_CONST(LC_NUMERIC, int) - PSI_CONST(LC_TIME, int) - - PSI_CONST(LC_COLLATE_MASK, int) - PSI_CONST(LC_CTYPE_MASK, int) - PSI_CONST(LC_MESSAGES_MASK, int) - PSI_CONST(LC_MONETARY_MASK, int) - PSI_CONST(LC_NUMERIC_MASK, int) - PSI_CONST(LC_TIME_MASK, int) - PSI_CONST(LC_ALL_MASK, int) - - PSI_MACRO(locale_t LC_GLOBAL_LOCALE) - - PSI_OPAQUE_TYPE(locale_t) - - PSI_DECL(locale_t duplocale, [(locale_t loc)]) - PSI_DECL(void freelocale, [(locale_t loc)]) - PSI_DECL(struct lconv *localeconv, [(void)]) - PSI_DECL(locale_t newlocale, [(int mask, const char *locale, locale_t base)]) - PSI_DECL(char *setlocale, [(int category, const char *locale)]) - PSI_DECL(locale_t uselocale, [(locale_t loc)]) -} diff --git a/m4/posix/ndbm.m4 b/m4/posix/ndbm.m4 deleted file mode 100644 index 9cbd648..0000000 --- a/m4/posix/ndbm.m4 +++ /dev/null @@ -1,27 +0,0 @@ -PSI_CHECK_NDBM() { - - PSI_STRUCT(datum, [ - void *dptr, - int dsize] - ) - - PSI_OPAQUE_TYPE(DBM) - - PSI_CONST(DBM_INSERT, int) - PSI_CONST(DBM_REPLACE, int) - - PSI_DECL(void dbm_clearerr, [(DBM *db)], [], [-lqdbm -lgdbm_compat]) - PSI_DECL(void dbm_close, [(DBM *db)], [], [-lqdbm -lgdbm_compat]) - PSI_DECL(int dbm_delete, [(DBM *db, datum key)], [], [-lqdbm -lgdbm_compat]) - PSI_DECL(int dbm_error, [(DBM *db)], [], [-lqdbm -lgdbm_compat]) - PSI_DECL(datum dbm_fetch, [(DBM *db, datum key)], [], [-lqdbm -lgdbm_compat]) - PSI_DECL(datum dbm_firstkey, [(DBM *db)], [], [-lqdbm -lgdbm_compat]) - PSI_DECL(datum dbm_nextkey, [(DBM *db)], [], [-lqdbm -lgdbm_compat]) - PSI_DECL(DBM *dbm_open, [(char *file, int open_flags, mode_t file_mode)], [], [-lqdbm -lgdbm_compat]) - PSI_DECL(int dbm_store, [(DBM *db, datum key, datum content, int store_mode)], [], [-lqdbm -lgdbm_compat]) - - # See http://www.gnu.org.ua/software/gdbm/manual/html_section/gdbm_19.html - if expr X"$LIBS" : "X.*-lgdbm_compat" >/dev/null; then - LIBS="-lgdbm $LIBS" - fi -} \ No newline at end of file diff --git a/m4/posix/netdb.m4 b/m4/posix/netdb.m4 deleted file mode 100644 index e384ef7..0000000 --- a/m4/posix/netdb.m4 +++ /dev/null @@ -1,108 +0,0 @@ -PSI_CHECK_NETDB() { - - PSI_STRUCT(struct hostent, [ - char *h_name, - char **h_aliases, - int h_addrtype, - int h_length, - char **h_addr_list] - ) - - PSI_STRUCT(struct netent, [ - char *n_name, - char **n_aliases, - int n_addrtype, - uint32_t n_net] - ) - - PSI_STRUCT(struct protoent, [ - char *p_name, - char **p_aliases, - int p_proto] - ) - - PSI_STRUCT(struct servent, [ - char *s_name, - char **s_aliases, - int s_port, - char *s_proto] - ) - - PSI_CONST(IPPORT_RESERVED, int) - - PSI_STRUCT(struct addrinfo, [ - int ai_flags, - int ai_family, - int ai_socktype, - int ai_protocol, - socklen_t ai_addrlen, - struct sockaddr *ai_addr, - char *ai_canonname, - struct addrinfo *ai_next] - ) - - PSI_CONST(AI_PASSIVE, int) - PSI_CONST(AI_CANONNAME, int) - PSI_CONST(AI_NUMERICHOST, int) - PSI_CONST(AI_NUMERICSERV, int) - PSI_CONST(AI_V4MAPPED, int) - PSI_CONST(AI_ALL, int) - PSI_CONST(AI_ADDRCONFIG, int) - - PSI_CONST(NI_NOFQDN, int) - PSI_CONST(NI_NUMERICHOST, int) - PSI_CONST(NI_NAMEREQD, int) - PSI_CONST(NI_NUMERICSERV, int) - PSI_CONST(NI_NUMERICSCOPE, int) - PSI_CONST(NI_DGRAM, int) - - PSI_CONST(NI_MAXHOST, int) - PSI_CONST(NI_MAXSERV, int) - - PSI_CONST(EAI_AGAIN, int) - PSI_CONST(EAI_BADFLAGS, int) - PSI_CONST(EAI_FAIL, int) - PSI_CONST(EAI_FAMILY, int) - PSI_CONST(EAI_MEMORY, int) - PSI_CONST(EAI_NONAME, int) - PSI_CONST(EAI_SERVICE, int) - PSI_CONST(EAI_SOCKTYPE, int) - PSI_CONST(EAI_SYSTEM, int) - PSI_CONST(EAI_OVERFLOW, int) - - PSI_DECL(void endhostent, [(void)]) - PSI_DECL(void endnetent, [(void)]) - PSI_DECL(void endprotoent, [(void)]) - PSI_DECL(void endservent, [(void)]) - PSI_DECL(void freeaddrinfo, [(struct addrinfo *res)]) - PSI_DECL(const char *gai_strerror, [(int errcode)]) - PSI_DECL(int getaddrinfo, [(char *node, char *service, struct addrinfo *hints, struct addrinfo **res)]) - PSI_DECL(struct hostent *gethostent, [(void)]) - PSI_DECL(int getnameinfo, [(struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags)]) - PSI_DECL(struct netent *getnetbyaddr, [(uint32_t net, int type)]) - PSI_DECL(struct netent *getnetbyname, [(char *name)]) - PSI_DECL(struct netent *getnetent, [(void)]) - PSI_DECL(struct protoent *getprotobyname, [(char *name)]) - PSI_DECL(struct protoent *getprotobynumber, [(int proto)]) - PSI_DECL(struct protoent *getprotoent, [(void)]) - PSI_DECL(struct servent *getservbyname, [(char *name, char *proto)]) - PSI_DECL(struct servent *getservbyport, [(int port, char *proto)]) - PSI_DECL(struct servent *getservent, [(void)]) - PSI_DECL(void sethostent, [(int stayopen)]) - PSI_DECL(void setnetent, [(int stayopen)]) - PSI_DECL(void setprotoent, [(int stayopen)]) - PSI_DECL(void setservent, [(int stayopen)]) - - PSI_STRUCT(struct gaicb, [ - const char *ar_name, - const char *ar_service, - const struct addrinfo *ar_request, - struct addrinfo *ar_result] - ) - - PSI_DECL(int getaddrinfo_a, [(int mode, struct gaicb *list@<:@@:>@, int nitems, struct sigevent *sevp)], [], [-lanl]) - PSI_DECL(int gai_suspend, [(const struct gaicb *list@<:@@:>@, int nitems, const struct timespec *timeout)], [], [-lanl]) - PSI_DECL(int gai_error, [(struct gaicb *req)], [], [-lanl]) - PSI_DECL(int gai_cancel, [(struct gaicb *req)], [], [-lanl]) - -} diff --git a/m4/posix/netinet_in.m4 b/m4/posix/netinet_in.m4 deleted file mode 100644 index 7b26e8c..0000000 --- a/m4/posix/netinet_in.m4 +++ /dev/null @@ -1,65 +0,0 @@ -PSI_CHECK_NETINET_IN() { - - PSI_TYPE(in_port_t, uint) - PSI_TYPE(in_addr_t, uint) - - PSI_STRUCT(struct in_addr, [ - in_addr_t s_addr] - ) - - PSI_STRUCT(struct sockaddr_in, [ - sa_family_t sin_family, - in_port_t sin_port, - struct in_addr sin_addr] - ) - - PSI_STRUCT(struct in6_addr, [ - uint8_t s6_addr@<:@16@:>@] - ) - PSI_STRUCT(struct sockaddr_in6, [ - sa_family_t sin6_family, - in_port_t sin6_port, - uint32_t sin6_flowinfo, - struct in6_addr sin6_addr, - uint32_t sin6_scope_id] - ) - - PSI_STRUCT(struct ipv6_mreq, [ - struct in6_addr ipv6mr_multiaddr, - unsigned ipv6mr_interface] - ) - - PSI_CONST(IPPROTO_IP, int) - PSI_CONST(IPPROTO_IPV6, int) - PSI_CONST(IPPROTO_ICMP, int) - PSI_CONST(IPPROTO_RAW, int) - PSI_CONST(IPPROTO_TCP, int) - PSI_CONST(IPPROTO_UDP, int) - - PSI_CONST(INADDR_ANY, int) - PSI_CONST(INADDR_BROADCAST, int) - PSI_CONST(INET6_ADDRSTRLEN, int) - - PSI_CONST(IPV6_JOIN_GROUP, int) - PSI_CONST(IPV6_LEAVE_GROUP, int) - PSI_CONST(IPV6_MULTICAST_HOPS, int) - PSI_CONST(IPV6_MULTICAST_IF, int) - PSI_CONST(IPV6_MULTICAST_LOOP, int) - PSI_CONST(IPV6_UNICAST_HOPS, int) - PSI_CONST(IPV6_V6ONLY, int) - - PSI_MACRO(int IN6_IS_ADDR_UNSPECIFIED, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_LOOPBACK, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_MULTICAST, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_LINKLOCAL, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_SITELOCAL, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_V4MAPPED, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_V4COMPAT, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_MC_NODELOCAL, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_MC_LINKLOCAL, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_MC_SITELOCAL, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_MC_ORGLOCAL, [(const struct in6_addr *a)]) - PSI_MACRO(int IN6_IS_ADDR_MC_GLOBAL, [(const struct in6_addr *a)]) - - PSI_MACRO(struct in6_addr in6addr_loopback) -} diff --git a/m4/posix/netinet_tcp.m4 b/m4/posix/netinet_tcp.m4 deleted file mode 100644 index 5731002..0000000 --- a/m4/posix/netinet_tcp.m4 +++ /dev/null @@ -1,3 +0,0 @@ -PSI_CHECK_NETINET_TCP() { - PSI_CONST(TCP_NODELAY, int) -} diff --git a/m4/posix/poll.m4 b/m4/posix/poll.m4 deleted file mode 100644 index b53e11b..0000000 --- a/m4/posix/poll.m4 +++ /dev/null @@ -1,23 +0,0 @@ -PSI_CHECK_POLL() { - - PSI_STRUCT(struct pollfd, [ - int fd, - short events, - short revents] - ) - - PSI_TYPE(nfds_t, uint) - - PSI_CONST(POLLIN, int) - PSI_CONST(POLLRDNORM, int) - PSI_CONST(POLLRDBAND, int) - PSI_CONST(POLLPRI, int) - PSI_CONST(POLLOUT, int) - PSI_CONST(POLLWRNORM, int) - PSI_CONST(POLLRWBAND, int) - PSI_CONST(POLLERR, int) - PSI_CONST(POLLHUP, int) - PSI_CONST(POLLNVAL, int) - - PSI_DECL(int poll, [(struct pollfd *fds, nfds_t nfds, int timeout)]) -} diff --git a/m4/posix/signal.m4 b/m4/posix/signal.m4 deleted file mode 100644 index 4d954b6..0000000 --- a/m4/posix/signal.m4 +++ /dev/null @@ -1,186 +0,0 @@ -PSI_CHECK_SIGNAL() { - - PSI_PTHREAD - - PSI_CONST(SIG_DFL, int) - PSI_CONST(SIG_ERR, int) - PSI_CONST(SIG_HOLD, int) - PSI_CONST(SIG_IGN, int) - - PSI_CONST(SIGEV_NONE, int) - PSI_CONST(SIGEV_SIGNAL, int) - PSI_CONST(SIGEV_THREAD, int) - - PSI_MACRO(int SIGRTMIN) - PSI_MACRO(int SIGRTMAX) - PSI_MACRO(int RTSIG_MAX) - - PSI_CONST(SIGABRT, int) - PSI_CONST(SIGALRM, int) - PSI_CONST(SIGBUS, int) - PSI_CONST(SIGCHLD, int) - PSI_CONST(SIGCONT, int) - PSI_CONST(SIGFPE, int) - PSI_CONST(SIGHUP, int) - PSI_CONST(SIGILL, int) - PSI_CONST(SIGINT, int) - PSI_CONST(SIGKILL, int) - PSI_CONST(SIGPIPE, int) - PSI_CONST(SIGQUIT, int) - PSI_CONST(SIGSEGV, int) - PSI_CONST(SIGSTOP, int) - PSI_CONST(SIGTERM, int) - PSI_CONST(SIGTSTP, int) - PSI_CONST(SIGTTIN, int) - PSI_CONST(SIGTTOU, int) - PSI_CONST(SIGUSR1, int) - PSI_CONST(SIGUSR2, int) - PSI_CONST(SIGPOLL, int) - PSI_CONST(SIGPROF, int) - PSI_CONST(SIGSYS, int) - PSI_CONST(SIGTRAP, int) - PSI_CONST(SIGURG, int) - PSI_CONST(SIGVTALRM, int) - PSI_CONST(SIGXCPU, int) - PSI_CONST(SIGXFSZ, int) - - PSI_MACRO(int SIG_BLOCK) - PSI_MACRO(int SIG_UNBLOCK) - PSI_MACRO(int SIG_SETMASK) - - PSI_CONST(SA_NOCLDSTOP, int) - PSI_CONST(SA_ONSTACK, int) - PSI_CONST(SA_RESETHAND, int) - PSI_CONST(SA_RESTART, int) - PSI_CONST(SA_SIGINFO, int) - PSI_CONST(SA_NOCLDWAIT, int) - PSI_CONST(SA_NODEFER, int) - PSI_CONST(SS_ONSTACK, int) - PSI_CONST(SS_DISABLE, int) - PSI_CONST(MINSIGSTKSZ, int) - PSI_CONST(SIGSTKSZ, int) - - PSI_CONST(ILL_ILLOPC, int) - PSI_CONST(ILL_ILLOPN, int) - PSI_CONST(ILL_ILLADR, int) - PSI_CONST(ILL_ILLTRP, int) - PSI_CONST(ILL_PRVOPC, int) - PSI_CONST(ILL_PRVREG, int) - PSI_CONST(ILL_COPROC, int) - PSI_CONST(ILL_BADSTK, int) - PSI_CONST(FPE_INTDIV, int) - PSI_CONST(FPE_INTOVF, int) - PSI_CONST(FPE_FLTDIV, int) - PSI_CONST(FPE_FLTOVF, int) - PSI_CONST(FPE_FLTUND, int) - PSI_CONST(FPE_FLTRES, int) - PSI_CONST(FPE_FLTINV, int) - PSI_CONST(FPE_FLTSUB, int) - PSI_CONST(SEGV_MAPERR, int) - PSI_CONST(SEGV_ACCERR, int) - PSI_CONST(BUS_ADRALN, int) - PSI_CONST(BUS_ADRERR, int) - PSI_CONST(BUS_OBJERR, int) - PSI_CONST(TRAP_BRKPT, int) - PSI_CONST(TRAP_TRACE, int) - PSI_CONST(CLD_EXITED, int) - PSI_CONST(CLD_KILLED, int) - PSI_CONST(CLD_DUMPED, int) - PSI_CONST(CLD_TRAPPED, int) - PSI_CONST(CLD_STOPPED, int) - PSI_CONST(CLD_CONTINUED, int) - PSI_CONST(POLL_IN, int) - PSI_CONST(POLL_OUT, int) - PSI_CONST(POLL_MSG, int) - PSI_CONST(POLL_ERR, int) - PSI_CONST(POLL_PRI, int) - PSI_CONST(POLL_HUP, int) - PSI_CONST(SI_USER, int) - PSI_CONST(SI_QUEUE, int) - PSI_CONST(SI_TIMER, int) - PSI_CONST(SI_ASYNCIO, int) - PSI_CONST(SI_MESGQ, int) - - PSI_TYPE(sig_atomic_t, int) - PSI_OPAQUE_TYPE(sigset_t) - PSI_OPAQUE_TYPE(mcontext_t) - - PSI_UNION(union sigval, [ - int sival_int, - void *sival_ptr] - ) - - PSI_STRUCT(struct sigevent, [ - int sigev_notify, - int sigev_signo, - union sigval sigev_value] - ) - - PSI_STRUCT(stack_t, [ - void *ss_sp, - size_t ss_size, - int ss_flags] - ) - - PSI_FUNCTOR_TYPE(void sighandler_t, [(int signo)]) - PSI_FUNCTOR_TYPE(void sigaction_t, [(int signo, siginfo_t *info, ucontext_t *context)]) - - PSI_STRUCT(struct sigaction, [ - sighandler_t sa_handler, - sigset_t sa_mask, - int sa_flags, - sigaction_t sa_sigaction] - ) - - PSI_STRUCT(ucontext_t, [ - ucontext_t *uc_link, - sigset_t uc_sigmask, - stack_t uc_stack, - mcontext_t uc_mcontext] - ) - - PSI_STRUCT(siginfo_t, [ - int si_signo, - int si_code, - int si_errno, - pid_t si_pid, - uid_t si_uid, - void *si_addr, - int si_status, - long si_band, - union sigval si_value] - ) - - PSI_DECL(int kill, [(pid_t pid, int sig)]) - PSI_DECL(int killpg, [(pid_t pgrp, int sig)]) - PSI_DECL(void psiginfo, [(const siginfo_t *pinfo, const char *s)]) - PSI_DECL(void psignal, [(int sig, const char *s)]) - - PSI_SH_TEST_POSIX_ENABLED(pthread, [ - PSI_DECL(int pthread_kill, [(pthread_t thread, int sig)]) - PSI_DECL(int pthread_sigmask, [(int how, const sigset_t *set, sigset_t *oldset)]) - ]) - - PSI_DECL(int raise, [(int sig)]) - PSI_DECL(int sigaction, [(int sig, struct sigaction *act, struct sigaction *oact)]) - PSI_DECL(int sigaddset, [(sigset_t * set, int signum)]) - PSI_DECL(int sigaltstack, [(const stack_t *ss, stack_t *oss)]) - PSI_DECL(int sigdelset, [(sigset_t *set, int signum)]) - PSI_DECL(int sigemptyset, [(sigset_t *set)]) - PSI_DECL(int sigfillset, [(sigset_t *set)]) - PSI_DECL(int sighold, [(int sig)]) - PSI_DECL(int sigignore, [(int sig)]) - PSI_DECL(int siginterrupt, [(int sig, int flag)]) - PSI_DECL(int sigismember, [(const sigset_t *set, int signum)]) - PSI_DECL(sighandler_t signal, [(int sig, sighandler_t func)]) - PSI_DECL(int sigpause, [(int sig)]) - PSI_DECL(int sigpending, [(sigset_t *set)]) - PSI_DECL(int sigprocmask, [(int how, const sigset_t *set, sigset_t *oset)]) - PSI_DECL(int sigqueue, [(pid_t pid, int sig, const union sigval value)]) - PSI_DECL(int sigrelse, [(int sig)]) - PSI_DECL(sighandler_t sigset, [(int sig, sighandler_t disp)]) - PSI_DECL(int sigsuspend, [(const sigset_t *sigmask)]) - PSI_DECL(int sigtimedwait, [(const sigset_t *set, siginfo_t *info, const struct timespec *timeout)]) - PSI_DECL(int sigwait, [(const sigset_t *set, int *sig)]) - PSI_DECL(int sigwaitinfo, [(const sigset_t *set, siginfo_t *info)]) -} \ No newline at end of file diff --git a/m4/posix/stdarg.m4 b/m4/posix/stdarg.m4 deleted file mode 100644 index 8b5f703..0000000 --- a/m4/posix/stdarg.m4 +++ /dev/null @@ -1,4 +0,0 @@ -PSI_CHECK_STDARG() { - PSI_OPAQUE_TYPE(va_list) - PSI_OPAQUE_TYPE(__builtin_va_list) -} \ No newline at end of file diff --git a/m4/posix/stddef.m4 b/m4/posix/stddef.m4 deleted file mode 100644 index 2c9abf2..0000000 --- a/m4/posix/stddef.m4 +++ /dev/null @@ -1,24 +0,0 @@ -PSI_CHECK_STDDEF() { - dnl Though, autoconf manual says "This macro is obsolescent, as current systems - dnl have conforming header files. New programs need not use this macro.", in fact - dnl AC_INCLUDES_DEFAULT still relies on STDC_HEADERS - AC_HEADER_STDC - - AC_CHECK_HEADERS(stddef.h) - - PSI_TYPE(ptrdiff_t, int) - PSI_CONST(PTRDIFF_MIN, int) - PSI_CONST(PTRDIFF_MAX, int) - PSI_TYPE(size_t, uint) - PSI_CONST(SIZE_MAX, int) - PSI_TYPE(wchar_t, int) - if PSI_SH_TEST_SIZEOF(wchar_t); then :; else - # some platforms fail to provide wchar_t in stddef.h - unset ac_cv_sizeof_wchar_t - unset ax_cv_decl_wchar_t_signed - AC_CHECK_HEADERS(wchar.h) - PSI_TYPE(wchar_t, int) - fi - PSI_CONST(WCHAR_MIN, int) - PSI_CONST(WCHAR_MAX, int) -} diff --git a/m4/posix/stdint.m4 b/m4/posix/stdint.m4 deleted file mode 100644 index 8ab9112..0000000 --- a/m4/posix/stdint.m4 +++ /dev/null @@ -1,78 +0,0 @@ -PSI_CHECK_STDINT() { - AC_CHECK_HEADERS(stdint.h) - - PSI_TYPE(int8_t, sint) - PSI_TYPE(uint8_t, uint) - PSI_TYPE(int16_t, sint) - PSI_TYPE(uint16_t, uint) - PSI_TYPE(int32_t, sint) - PSI_TYPE(uint32_t, uint) - PSI_TYPE(int64_t, sint) - PSI_TYPE(uint64_t, uint) - PSI_TYPE(int_least8_t, sint) - PSI_TYPE(int_least16_t, sint) - PSI_TYPE(int_least32_t, sint) - PSI_TYPE(int_least64_t, sint) - PSI_TYPE(uint_least8_t, uint) - PSI_TYPE(uint_least16_t, uint) - PSI_TYPE(uint_least32_t, uint) - PSI_TYPE(uint_least64_t, uint) - PSI_TYPE(int_fast8_t, sint) - PSI_TYPE(int_fast16_t, sint) - PSI_TYPE(int_fast32_t, sint) - PSI_TYPE(int_fast64_t, sint) - PSI_TYPE(uint_fast8_t, uint) - PSI_TYPE(uint_fast16_t, uint) - PSI_TYPE(uint_fast32_t, uint) - PSI_TYPE(uint_fast64_t, uint) - PSI_TYPE(intptr_t, sint) - PSI_TYPE(uintptr_t, uint) - PSI_TYPE(intmax_t, sint) - PSI_TYPE(uintmax_t, uint) - - PSI_CONST(INT8_MIN, int) - PSI_CONST(INT8_MAX, int) - PSI_CONST(UINT8_MAX, int) - PSI_CONST(INT16_MIN, int) - PSI_CONST(INT16_MAX, int) - PSI_CONST(UINT16_MAX, int) - PSI_CONST(INT32_MIN, int) - PSI_CONST(INT32_MAX, int) - PSI_CONST(UINT32_MAX, int) - PSI_CONST(INT64_MIN, int) - PSI_CONST(INT64_MAX, int) - PSI_CONST(UINT64_MAX, int) - - PSI_CONST(INT_LEAST8_MIN, int) - PSI_CONST(INT_LEAST8_MAX, int) - PSI_CONST(UINT_LEAST8_MAX, int) - PSI_CONST(INT_LEAST16_MIN, int) - PSI_CONST(INT_LEAST16_MAX, int) - PSI_CONST(UINT_LEAST16_MAX, int) - PSI_CONST(INT_LEAST32_MIN, int) - PSI_CONST(INT_LEAST32_MAX, int) - PSI_CONST(UINT_LEAST32_MAX, int) - PSI_CONST(INT_LEAST64_MIN, int) - PSI_CONST(INT_LEAST64_MAX, int) - PSI_CONST(UINT_LEAST64_MAX, int) - - PSI_CONST(INT_FAST8_MIN, int) - PSI_CONST(INT_FAST8_MAX, int) - PSI_CONST(UINT_FAST8_MAX, int) - PSI_CONST(INT_FAST16_MIN, int) - PSI_CONST(INT_FAST16_MAX, int) - PSI_CONST(UINT_FAST16_MAX, int) - PSI_CONST(INT_FAST32_MIN, int) - PSI_CONST(INT_FAST32_MAX, int) - PSI_CONST(UINT_FAST32_MAX, int) - PSI_CONST(INT_FAST64_MIN, int) - PSI_CONST(INT_FAST64_MAX, int) - PSI_CONST(UINT_FAST64_MAX, int) - - PSI_CONST(INTPTR_MIN, int) - PSI_CONST(INTPTR_MAX, int) - PSI_CONST(UINTPTR_MAX, int) - PSI_CONST(INTMAX_MIN, int) - PSI_CONST(INTMAX_MAX, int) - PSI_CONST(UINTMAX_MAX, int) -} diff --git a/m4/posix/stdio.m4 b/m4/posix/stdio.m4 deleted file mode 100644 index b1307cc..0000000 --- a/m4/posix/stdio.m4 +++ /dev/null @@ -1,85 +0,0 @@ -PSI_CHECK_STDIO() { - PSI_STRUCT(FILE) - PSI_STRUCT(fpos_t) - - PSI_CONST(BUFSIZ, int) - PSI_CONST(_IOFBF, int) - PSI_CONST(_IOLBF, int) - PSI_CONST(_IONBF, int) - PSI_CONST(SEEK_CUR, int) - PSI_CONST(SEEK_END, int) - PSI_CONST(SEEK_SET, int) - PSI_CONST(FILENAME_MAX, int) - PSI_CONST(FOPEN_MAX, int) - PSI_CONST(TMP_MAX, int) - PSI_CONST(EOF, int) - PSI_CONST(P_tmpdir, string) - PSI_CONST(L_ctermid, int) - PSI_CONST(L_tmpnam, int) - - PSI_MACRO(FILE *stderr) - PSI_MACRO(FILE *stdout) - PSI_MACRO(FILE *stdin) - - PSI_DECL(void clearerr, [(FILE *stream)]) - PSI_DECL(char *ctermid, [(char *s)]) - PSI_DECL(int fclose, [(FILE *stream)]) - PSI_DECL(FILE *fdopen, [(int fd, char *mode)]) - PSI_DECL(int feof, [(FILE *stream)]) - PSI_DECL(int ferror, [(FILE *stream)]) - PSI_DECL(int fflush, [(FILE *stream)]) - PSI_DECL(int fgetc, [(FILE *stream)]) - PSI_DECL(int fgetpos, [(FILE *stream, fpos_t *pos)]) - PSI_DECL(char *fgets, [(char *buf, int len, FILE *stream)]) - PSI_DECL(int fileno, [(FILE *stream)]) - PSI_DECL(void flockfile, [(FILE *stream)]) - PSI_DECL(FILE *fmemopen, [(void *buf, size_t len, char *mode)]) - PSI_DECL(FILE *fopen, [(char *path, char *mode)]) - PSI_DECL(int fputc, [(int c, FILE *stream)]) - PSI_DECL(int fputs, [(char *s, FILE *stream)]) - PSI_DECL(size_t fread, [(void *buf, size_t len, size_t n, FILE *stream)]) - PSI_DECL(FILE *freopen, [(char *path, char *mode, FILE *stream)]) - PSI_DECL(int fseek, [(FILE *stream, long offset, int whence)]) - PSI_DECL(int fseeko, [(FILE *stream, off_t offset, int whence)]) - PSI_DECL(int fsetpos, [(FILE *stream, fpos_t *pos)]) - PSI_DECL(long ftell, [(FILE *stream)]) - PSI_DECL(off_t ftello, [(FILE *stream)]) - PSI_DECL(int ftrylockfile, [(FILE *stream)]) - PSI_DECL(void funlockfile, [(FILE *stream)]) - PSI_DECL(size_t fwrite, [(void *buf, size_t len, size_t n, FILE *stream)]) - PSI_DECL(int getc, [(FILE *stream)]) - PSI_DECL(int getchar, [(void)]) - PSI_DECL(int getc_unlocked, [(FILE *stream)]) - PSI_DECL(int getchar_unlocked, [(void)]) - PSI_DECL(ssize_t getdelim, [(char **lineptr, size_t *n, int delim, FILE *stream)]) - PSI_DECL(ssize_t getline, [(char **lineptr, size_t *n, FILE *stream)]) - PSI_DECL(char *gets, [(char *buf)]) - PSI_DECL(FILE *open_memstream, [(char **ptr, size_t *sizeloc)]) - PSI_DECL(int pclose, [(FILE *stream)]) - PSI_DECL(void perror, [(char *s)]) - PSI_DECL(FILE *popen, [(char *command, char *type)]) - PSI_DECL(int putc, [(int c, FILE *stream)]) - PSI_DECL(int putchar, [(int c)]) - PSI_DECL(int putc_unlocked, [(int c, FILE *stream)]) - PSI_DECL(int putchar_unlocked, [(int c)]) - PSI_DECL(int puts, [(char *s)]) - PSI_DECL(int remove, [(char *path)]) - PSI_DECL(int rename, [(char *old, char *new)]) - PSI_DECL(int renameat, [(int oldfd, char *oldpath, int newfd, char *newpath)]) - PSI_DECL(void rewind, [(FILE *stream)]) - PSI_DECL(void setbuf, [(FILE *stream, char *buf)]) - PSI_DECL(int setvbuf, [(FILE *stream, char *buf, int mode, size_t size)]) - PSI_DECL(char *tempnam, [(char *dir, char *prefix)]) - PSI_DECL(FILE *tmpfile, [(void)]) - PSI_DECL(char *tmpnam, [(char *s)]) - PSI_DECL(int ungetc, [(int c, FILE *stream)]) - - PSI_DECL(int dprintf, [(int fd, char *format)], vararg) - PSI_DECL(int fprintf, [(FILE *stream, char *format)], vararg) - PSI_DECL(int fscanf, [(FILE *stream, char *format)], vararg) - PSI_DECL(int printf, [(char *format)], vararg) - PSI_DECL(int scanf, [(char *format)], vararg) - PSI_DECL(int snprintf, [(char *str, size_t size, char *format)], vararg) - PSI_DECL(int sprintf, [(char *str, char *format)], vararg) - PSI_DECL(int sscanf, [(char *str, char *format)], vararg) -} diff --git a/m4/posix/stdlib.m4 b/m4/posix/stdlib.m4 deleted file mode 100644 index c9ce354..0000000 --- a/m4/posix/stdlib.m4 +++ /dev/null @@ -1,76 +0,0 @@ -PSI_CHECK_STDLIB() { - PSI_STRUCT(div_t, [ - int quot, - int rem - ]) - PSI_STRUCT(ldiv_t, [ - long quot, - long rem - ]) - PSI_STRUCT(lldiv_t, [ - long long quot, - long long rem - ]) - - PSI_CONST(EXIT_FAILURE, int) - PSI_CONST(EXIT_SUCCESS, int) - PSI_CONST(RAND_MAX, int) - - PSI_MACRO(int MB_CUR_MAX) - - PSI_DECL(void _Exit, [(int status)]) - PSI_DECL(void abort, [()]) - PSI_DECL(int abs, [(int n)]) - PSI_DECL(double atof, [(char *str)]) - PSI_DECL(int atoi, [(char *str)]) - PSI_DECL(long atol, [(char *str)]) - PSI_DECL(void *calloc, [(size_t nmemb, size_t size)]) - PSI_DECL(div_t div, [(int numerator, int denominator)]) - PSI_DECL(double drand48, [()]) - PSI_DECL(double erand48, [(unsigned short xsubi@<:@3@:>@)]) - PSI_DECL(void exit, [(int status)]) - PSI_DECL(void free, [(void *ptr)]) - PSI_DECL(char *getenv, [(char *var)]) - PSI_DECL(int grantpt, [(int fd)]) - PSI_DECL(char *initstate, [(unsigned int seed, char *state, size_t n)]) - PSI_DECL(long jrand48, [(unsigned short xsubi@<:@3@:>@)]) - PSI_DECL(long labs, [(long l)]) - PSI_DECL(void lcong48, [(unsigned short param@<:@7@:>@)]) - PSI_DECL(ldiv_t ldiv, [(long numerator, long denominator)]) - PSI_DECL(lldiv_t lldiv, [(long long numerator, long long denominator)]) - PSI_DECL(long lrand48, [()]) - PSI_DECL(void *malloc, [(size_t size)]) - PSI_DECL(int mblen, [(const char *s, size_t n)]) - PSI_DECL(size_t mbstowcs, [(wchar_t *dest, char *src, size_t n)]) - PSI_DECL(int mbtowc, [(wchar_t *pwc, char *s, size_t n)]) - PSI_DECL(char *mkdtemp, [(char *template)]) - PSI_DECL(char *mkdstemp, [(char *template)]) - PSI_DECL(long mrand48, [()]) - PSI_DECL(long nrand48, [(unsigned short xsubi@<:@3@:>@)]) - PSI_DECL(int posix_openpt, [(int flags)]) - PSI_DECL(char *ptsname, [(int fd)]) - PSI_DECL(int ptsname_r, [(int fd, char *buf, size_t buflen)]) - PSI_DECL(int putenv, [(char *var)]) - PSI_DECL(int rand, [()]) - PSI_DECL(int rand_r, [(unsigned *seed_p)]) - PSI_DECL(long random, [()]) - PSI_DECL(void *realloc, [(void *ptr, size_t size)]) - PSI_DECL(char *realpath, [(char *path, char *resolved)]) - PSI_DECL(unsigned short *seed48, [(unsigned short seed16v@<:@3@:>@)]) - PSI_DECL(int setenv, [(char *var, char *val, int overwrite)]) - PSI_DECL(void setkey, [(char *key)], [], [-lcrypt]) - PSI_DECL(char *setstate, [(char *state)]) - PSI_DECL(void srand, [(unsigned seed)]) - PSI_DECL(void srand48, [(long seed)]) - PSI_DECL(void srandom, [(unsigned seed)]) - PSI_DECL(double strtod, [(char *nptr, char **endptr)]) - PSI_DECL(float strtof, [(char *nptr, char **endptr)]) - PSI_DECL(long strtol, [(char *nptr, char **endptr, int base)]) - PSI_DECL(long double strtold, [(const char *nptr, char **endptr)]) - PSI_DECL(unsigned long strtoul, [(char *nptr, char **endptr, int base)]) - PSI_DECL(int system, [(char *command)]) - PSI_DECL(int unlockpt, [(int fd)]) - PSI_DECL(int unsetenv, [(char *var)]) - PSI_DECL(size_t wcstombs, [(char *dest, wchar_t *src, size_t n)]) - PSI_DECL(int wctomb, [(char *s, wchar_t wc)]) -} diff --git a/m4/posix/sys_select.m4 b/m4/posix/sys_select.m4 deleted file mode 100644 index 3b82f96..0000000 --- a/m4/posix/sys_select.m4 +++ /dev/null @@ -1,15 +0,0 @@ -PSI_CHECK_SYS_SELECT() { - PSI_STRUCT(fd_set, []) - - PSI_CONST(FD_SETSIZE, int) - - PSI_DECL(void FD_CLEAR, [(int fd, fd_set *s)]) - PSI_DECL(void FD_COPY, [(fd_set *s1, fd_set *s2)]) - PSI_DECL(void FD_CLR, [(int fd, fd_set *s)]) - PSI_DECL(void FD_SET, [(int fd, fd_set *s)]) - PSI_DECL(int FD_ISSET, [(int fd, fd_set *s)]) - PSI_DECL(void FD_ZERO, [(fd_set *s)]) - - PSI_DECL(int select, [(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout)]) - dnl PSI_DECL(int pselect, [(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout, sigset_t *sigmask)]) -} diff --git a/m4/posix/sys_socket.m4 b/m4/posix/sys_socket.m4 deleted file mode 100644 index bcadf33..0000000 --- a/m4/posix/sys_socket.m4 +++ /dev/null @@ -1,91 +0,0 @@ -PSI_CHECK_SYS_SOCKET() { - PSI_TYPE(socklen_t, int) - PSI_TYPE(sa_family_t, uint) - - PSI_STRUCT(struct sockaddr, [ - sa_family_t sa_family, - char sa_data@<:@0@:>@] - ) - PSI_STRUCT(struct sockaddr_storage, [ - sa_family_t ss_family] - ) - PSI_STRUCT(struct msghdr, [ - void *msg_name, - socklen_t msg_namelen, - struct iovec *msg_iov, - int msg_iovlen, - void *msg_control, - socklen_t msg_controllen, - int msg_flags] - ) - PSI_STRUCT(struct cmsghdr, [ - socklen_t cmsg_len, - int cmsg_level, - int cmsg_type] - ) - PSI_STRUCT(struct linger, [ - int l_onoff, - int l_linger] - ) - - PSI_CONST(AF_INET, int) - PSI_CONST(AF_INET6, int) - PSI_CONST(AF_UNIX, int) - PSI_CONST(AF_UNSPEC, int) - PSI_CONST(MSG_CTRUNC, int) - PSI_CONST(MSG_DONTROUTE, int) - PSI_CONST(MSG_EOR, int) - PSI_CONST(MSG_NOSIGNAL, int) - PSI_CONST(MSG_OOB, int) - PSI_CONST(MSG_PEEK, int) - PSI_CONST(MSG_TRUNC, int) - PSI_CONST(MSG_WAITALL, int) - PSI_CONST(SCM_RIGHTS, int) - PSI_CONST(SHUT_RD, int) - PSI_CONST(SHUT_RDWR, int) - PSI_CONST(SHUT_WR, int) - PSI_CONST(SOCK_DGRAM, int) - PSI_CONST(SOCK_RAW, int) - PSI_CONST(SOCK_SEQPACKET, int) - PSI_CONST(SOCK_STREAM, int) - PSI_CONST(SOL_SOCKET, int) - PSI_CONST(SO_ACCEPTCONN, int) - PSI_CONST(SO_BROADCAST, int) - PSI_CONST(SO_DEBUG, int) - PSI_CONST(SO_DONTROUTE, int) - PSI_CONST(SO_ERROR, int) - PSI_CONST(SO_KEEPALIVE, int) - PSI_CONST(SO_LINGER, int) - PSI_CONST(SO_OOBINLINE, int) - PSI_CONST(SO_RCVBUF, int) - PSI_CONST(SO_RCVLOWAT, int) - PSI_CONST(SO_RCVTIMEO, int) - PSI_CONST(SO_REUSEADDR, int) - PSI_CONST(SO_SNDBUF, int) - PSI_CONST(SO_SNDLOWAT, int) - PSI_CONST(SO_SNDTIMEO, int) - PSI_CONST(SO_TYPE, int) - - PSI_MACRO(unsigned char *CMSG_DATA, [(struct cmsghdr *m)]) - PSI_MACRO(struct cmsghdr *CMSG_NXTHDR, [(struct msghdr *m, struct cmsghdr *c)]) - PSI_MACRO(struct cmsghdr *CMSG_FIRSTHDR, [(struct msghdr *m)]) - - PSI_DECL(int accept, [(int socket, struct sockaddr *address, socklen_t *address_len)]) - PSI_DECL(int bind, [(int socket, struct sockaddr *address, socklen_t address_len)]) - PSI_DECL(int connect, [(int socket, struct sockaddr *address, socklen_t address_len)]) - PSI_DECL(int getpeername, [(int socket, struct sockaddr *address, socklen_t *address_len)]) - PSI_DECL(int getsockname, [(int socket, struct sockaddr *address, socklen_t *address_len)]) - PSI_DECL(int getsockopt, [(int socket, int level, int option_name, void *option_value, socklen_t *option_len)]) - PSI_DECL(int listen, [(int socket, int backlog)]) - PSI_DECL(int recv, [(int socket, void *buffer, size_t length, int flags)]) - PSI_DECL(int recvfrom, [(int socket, void *buffer, size_t length, int flags, struct sockaddr *address, socklen_t *address_len)]) - PSI_DECL(int recvmsg, [(int socket, struct msghdr *message, int flags)]) - PSI_DECL(int send, [(int socket, void *buffer, size_t length, int flags)]) - PSI_DECL(int sendmsg, [(int socket, struct msghdr *message, int flags)]) - PSI_DECL(int sendto, [(int socket, void *message, size_t length, int flags, struct sockaddr *dest_addr, socklen_t dest_len)]) - PSI_DECL(int setsockopt, [(int socket, int level, int option_name, void *option_value, socklen_t option_len)]) - PSI_DECL(int shutdown, [(int socket, int how)]) - PSI_DECL(int sockatmark, [(int socket)]) - PSI_DECL(int socket, [(int domain, int type, int protocol)]) - PSI_DECL(int socketpair, [(int domain, int type, int protocol, int socket_vector@<:@2@:>@)]) -} diff --git a/m4/posix/sys_stat.m4 b/m4/posix/sys_stat.m4 deleted file mode 100644 index f89a232..0000000 --- a/m4/posix/sys_stat.m4 +++ /dev/null @@ -1,84 +0,0 @@ -PSI_CHECK_SYS_STAT() { - - PSI_STRUCT(struct stat, [ - dev_t st_dev, - ino_t st_ino, - mode_t st_mode, - nlink_t st_nlink, - uid_t st_uid, - gid_t st_gid, - dev_t st_rdev, - off_t st_size, - blksize_t st_blksize, - blkcnt_t st_blocks, - time_t st_atime, - time_t st_mtime, - time_t st_ctime, - struct timespec st_atim, - struct timespec st_mtim, - struct timespec st_ctim, - struct timespec st_atimespec, - struct timespec st_mtimespec, - struct timespec st_ctimespec, - struct timespec st_birthtimespec, - time_t st_birthtime, - int st_flags, - int st_gen] - ) - - PSI_CONST(S_IFMT, int) - PSI_CONST(S_IFBLK, int) - PSI_CONST(S_IFCHR, int) - PSI_CONST(S_IFIFO, int) - PSI_CONST(S_IFREG, int) - PSI_CONST(S_IFDIR, int) - PSI_CONST(S_IFLNK, int) - PSI_CONST(S_IFSOCK, int) - PSI_CONST(S_IRWXU, int) - PSI_CONST(S_IRUSR, int) - PSI_CONST(S_IWUSR, int) - PSI_CONST(S_IXUSR, int) - PSI_CONST(S_IRWXG, int) - PSI_CONST(S_IRGRP, int) - PSI_CONST(S_IWGRP, int) - PSI_CONST(S_IXGRP, int) - PSI_CONST(S_IRWXO, int) - PSI_CONST(S_IROTH, int) - PSI_CONST(S_IWOTH, int) - PSI_CONST(S_IXOTH, int) - PSI_CONST(S_ISUID, int) - PSI_CONST(S_ISGID, int) - PSI_CONST(S_ISVTX, int) - PSI_CONST(UTIME_NOW, int) - PSI_CONST(UTIME_OMIT, int) - - PSI_MACRO(int S_ISBLK, [(mode_t m)]) - PSI_MACRO(int S_ISCHR, [(mode_t m)]) - PSI_MACRO(int S_ISDIR, [(mode_t m)]) - PSI_MACRO(int S_ISFIFO, [(mode_t m)]) - PSI_MACRO(int S_ISREG, [(mode_t m)]) - PSI_MACRO(int S_ISLNK, [(mode_t m)]) - PSI_MACRO(int S_ISSOCK, [(mode_t m)]) - - PSI_MACRO(int S_TYPEISMQ, [(struct stat *s)]) - PSI_MACRO(int S_TYPEISSEM, [(struct stat *s)]) - PSI_MACRO(int S_TYPEISSHM, [(struct stat *s)]) - PSI_MACRO(int S_TYPEISTMO, [(struct stat *s)]) - - PSI_DECL(int chmod, [(char *path, mode_t mode)]) - PSI_DECL(int fchmod, [(int fd, mode_t mode)]) - PSI_DECL(int fchmodat, [(int fd, char *path, mode_t mode, int flag)]) - PSI_DECL(int fstat, [(int fd, struct stat *buf)]) - PSI_DECL(int fstatat, [(int fd, char *path, struct stat *buf, int flag)]) - PSI_DECL(int futimens, [(int fd, struct timespec times@<:@2@:>@)]) - PSI_DECL(int lstat, [(char *path, struct stat *buf)]) - PSI_DECL(int mkdir, [(char *path, mode_t mode)]) - PSI_DECL(int mkdirat, [(int fd, char *path, mode_t mode)]) - PSI_DECL(int mkfifo, [(char *path, mode_t mode)]) - PSI_DECL(int mkfifoat, [(int fd, char *path, mode_t mode)]) - PSI_DECL(int mknod, [(char *path, mode_t mode, dev_t dev)]) - PSI_DECL(int mknodat, [(int fd, char *path, mode_t mode, dev_t dev)]) - PSI_DECL(int stat, [(char *path, struct stat *buf)]) - PSI_DECL(mode_t umask, [(mode_t mode)]) - PSI_DECL(int utimensat, [(int fd, char *path, struct timespec times@<:@2@:>@, int flag)]) -} diff --git a/m4/posix/sys_time.m4 b/m4/posix/sys_time.m4 deleted file mode 100644 index c498c12..0000000 --- a/m4/posix/sys_time.m4 +++ /dev/null @@ -1,23 +0,0 @@ -PSI_CHECK_SYS_TIME() { - PSI_CONST(ITIMER_REAL, int) - PSI_CONST(ITIMER_VIRTUAL, int) - PSI_CONST(ITIMER_PROF, int) - - PSI_STRUCT(struct timeval, [ - time_t tv_sec, - suseconds_t tv_usec] - ) - PSI_STRUCT(struct itimerval, [ - struct timeval it_interval, - struct timeval it_value] - ) - PSI_STRUCT(struct timezone, [ - int tz_minuteswest, - int tz_dsttime] - ) - - PSI_DECL(int getitimer, [(int which, struct itimerval *value)]) - PSI_DECL(int setitimer, [(int which, struct itimerval *value, struct itimerval *ovalue)]) - PSI_DECL(int gettimeofday, [(struct timeval *tp, struct timezone *tz)]) - PSI_DECL(int utimes, [(char *path, struct timeval times@<:@2@:>@)]) -} diff --git a/m4/posix/sys_times.m4 b/m4/posix/sys_times.m4 deleted file mode 100644 index 0ae593c..0000000 --- a/m4/posix/sys_times.m4 +++ /dev/null @@ -1,11 +0,0 @@ -PSI_CHECK_SYS_TIMES() { - - PSI_STRUCT(struct tms, [ - clock_t tms_utime, - clock_t tms_stime, - clock_t tms_cutime, - clock_t tms_cstime] - ) - - PSI_DECL(clock_t times, [(struct tms *buf)]) -} diff --git a/m4/posix/sys_types.m4 b/m4/posix/sys_types.m4 deleted file mode 100644 index 88315df..0000000 --- a/m4/posix/sys_types.m4 +++ /dev/null @@ -1,24 +0,0 @@ -PSI_CHECK_SYS_TYPES() { - AC_CHECK_HEADERS(sys/types.h) - - PSI_TYPE(blkcnt_t, int) - PSI_TYPE(blksize_t, int) - PSI_TYPE(clock_t, int) - PSI_TYPE(clockid_t, int) - PSI_TYPE(dev_t, int) - PSI_TYPE(fsblkcnt_t, uint) - PSI_TYPE(fsfilcnt_t, uint) - PSI_TYPE(gid_t, int) - PSI_TYPE(id_t, int) - PSI_TYPE(ino_t, uint) - PSI_TYPE(key_t, int) - PSI_TYPE(mode_t, int) - PSI_TYPE(nlink_t, int) - PSI_TYPE(off_t, int) - PSI_TYPE(pid_t, int) - PSI_TYPE(ssize_t, int) - PSI_TYPE(suseconds_t, int) - PSI_TYPE(time_t, int) - PSI_TYPE(timer_t, int) - PSI_TYPE(uid_t, int) -} diff --git a/m4/posix/sys_uio.m4 b/m4/posix/sys_uio.m4 deleted file mode 100644 index d82d9a7..0000000 --- a/m4/posix/sys_uio.m4 +++ /dev/null @@ -1,10 +0,0 @@ -PSI_CHECK_SYS_UIO() { - - PSI_STRUCT(struct iovec, [ - void *iov_base, - size_t iov_len] - ) - - PSI_DECL(ssize_t readv, [(int fd, struct iovec *iov, int iovcnt)]) - PSI_DECL(ssize_t writev, [(int fd, struct iovec *iov, int iovcnt)]) -} diff --git a/m4/posix/sys_utsname.m4 b/m4/posix/sys_utsname.m4 deleted file mode 100644 index a268f81..0000000 --- a/m4/posix/sys_utsname.m4 +++ /dev/null @@ -1,13 +0,0 @@ -PSI_CHECK_SYS_UTSNAME() { - - PSI_STRUCT(struct utsname, [ - char sysname@<:@0@:>@, - char nodename@<:@0@:>@, - char release@<:@0@:>@, - char version@<:@0@:>@, - char machine@<:@0@:>@, - char domainname@<:@0@:>@ - ]) - - PSI_DECL(int uname, [(struct utsname *name)]) -} diff --git a/m4/posix/syslog.m4 b/m4/posix/syslog.m4 deleted file mode 100644 index 2c3764c..0000000 --- a/m4/posix/syslog.m4 +++ /dev/null @@ -1,41 +0,0 @@ -PSI_CHECK_SYSLOG() { - - PSI_CONST(LOG_PID, int) - PSI_CONST(LOG_CONS, int) - PSI_CONST(LOG_NDELAY, int) - PSI_CONST(LOG_ODELAY, int) - PSI_CONST(LOG_NOWAIT, int) - PSI_CONST(LOG_KERN, int) - PSI_CONST(LOG_USER, int) - PSI_CONST(LOG_MAIL, int) - PSI_CONST(LOG_NEWS, int) - PSI_CONST(LOG_UUCP, int) - PSI_CONST(LOG_DAEMON, int) - PSI_CONST(LOG_AUTH, int) - PSI_CONST(LOG_CRON, int) - PSI_CONST(LOG_LPR, int) - PSI_CONST(LOG_LOCAL0, int) - PSI_CONST(LOG_LOCAL1, int) - PSI_CONST(LOG_LOCAL2, int) - PSI_CONST(LOG_LOCAL3, int) - PSI_CONST(LOG_LOCAL4, int) - PSI_CONST(LOG_LOCAL5, int) - PSI_CONST(LOG_LOCAL6, int) - PSI_CONST(LOG_LOCAL7, int) - PSI_CONST(LOG_EMERG, int) - PSI_CONST(LOG_ALERT, int) - PSI_CONST(LOG_CRIT, int) - PSI_CONST(LOG_ERR, int) - PSI_CONST(LOG_WARNING, int) - PSI_CONST(LOG_NOTICE, int) - PSI_CONST(LOG_INFO, int) - PSI_CONST(LOG_DEBUG, int) - - PSI_MACRO(int LOG_MASK, [(int pri)]) - PSI_MACRO(int LOG_UPTO, [(int pri)]) - - PSI_DECL(void closelog, [(void)]) - PSI_DECL(void openlog, [(char *ident, int option, int facility)]) - PSI_DECL(void syslog, [(int priority, char *format)], vararg) - PSI_DECL(int setlogmask, [(int mask)]) -} diff --git a/m4/posix/time.m4 b/m4/posix/time.m4 deleted file mode 100644 index ea39f95..0000000 --- a/m4/posix/time.m4 +++ /dev/null @@ -1,62 +0,0 @@ -PSI_CHECK_TIME() { - PSI_CONST(CLOCKS_PER_SEC, int) - PSI_CONST(CLOCK_MONOTONIC, int) - PSI_CONST(CLOCK_PROCESS_CPUTIME_ID, int) - PSI_CONST(CLOCK_REALTIME, int) - PSI_CONST(CLOCK_THREAD_CPUTIME_ID, int) - PSI_CONST(TIMER_ABSTIME, int) - - PSI_STRUCT(struct tm, [ - int tm_sec, - int tm_min, - int tm_hour, - int tm_mday, - int tm_mon, - int tm_year, - int tm_wday, - int tm_yday, - int tm_isdst] - ) - PSI_STRUCT(struct timespec, [ - time_t tv_sec, - long tv_nsec] - ) - PSI_STRUCT(struct itimerspec, [ - struct timespec it_interval, - struct timespec it_value] - ) - - PSI_DECL(char *asctime, [(struct tm *tm)]) - PSI_DECL(char *asctime_r, [(struct tm *tm, char *buf)]) - PSI_DECL(clock_t clock, [()]) - PSI_DECL(int clock_getcpuclockid, [(pid_t pid, clockid_t *clock_id)], [], [-lrt]) - PSI_DECL(int clock_getres, [(clockid_t clk_id, struct timespec *res)], [], [-lrt]) - PSI_DECL(int clock_gettime, [(clockid_t clk_id, struct timespec *tp)], [], [-lrt]) - PSI_DECL(int clock_nanosleep, [(clockid_t clk_id, int flags, struct timespec *rqtp, struct timespec *rmtp)], [], [-lrt]) - PSI_DECL(int clock_settime, [(clockid_t clk_id, const struct timespec *tp)], [], [-lrt]) - PSI_DECL(char *ctime, [(time_t *t)]) - PSI_DECL(char *ctime_r, [(time_t *t, char *buf)]) - PSI_DECL(double difftime, [(time_t time1, time_t time0)]) - PSI_DECL(struct tm *getdate, [(char *string)]) - PSI_DECL(struct tm *gmtime, [(time_t *t)]) - PSI_DECL(struct tm *gmtime_r, [(time_t *t, struct tm *buf)]) - PSI_DECL(struct tm *localtime, [(time_t *t)]) - PSI_DECL(struct tm *localtime_r, [(time_t *t, struct tm *buf)]) - PSI_DECL(time_t mktime, [(struct tm *tm)]) - PSI_DECL(int nanosleep, [(struct timespec *rqts, struct timespec *rmts)]) - PSI_DECL(size_t strftime, [(char *s, size_t max, char *fmt, struct tm *tm)]) - PSI_DECL(size_t strftime_l, [(char *s, size_t max, char *fmt, struct tm *tm, locale_t l)]) - PSI_DECL(char *strptime, [(char *s, char *fmt, struct tm *tm)]) - PSI_DECL(time_t time, [(time_t *t)]) - PSI_DECL(int timer_create, [(clockid_t clk_id, struct sigevent *se, timer_t *t)], [], [-lrt]) - PSI_DECL(int timer_delete, [(timer_t t)], [], [-lrt]) - PSI_DECL(int timer_getoverrun, [(timer_t t)], [], [-lrt]) - PSI_DECL(int timer_gettime, [(timer_t t, struct itimerspec *ts)], [], [-lrt]) - PSI_DECL(int timer_settime, [(timer_t t, int flags, struct itimerspec *value, struct itimerspec *ovalue)], [], [-lrt]) - PSI_DECL(void tzset, [()]) - - PSI_MACRO(int getdate_err) - PSI_EXTVAR(int daylight) - PSI_EXTVAR(long timezone) - PSI_EXTVAR(char *tzname@<:@2@:>@) -} diff --git a/m4/posix/unistd.m4 b/m4/posix/unistd.m4 deleted file mode 100644 index 94be1ad..0000000 --- a/m4/posix/unistd.m4 +++ /dev/null @@ -1,369 +0,0 @@ -PSI_CHECK_UNISTD() { - PSI_CONST(F_LOCK, int) - PSI_CONST(F_TEST, int) - PSI_CONST(F_TLOCK, int) - PSI_CONST(F_ULOCK, int) - PSI_CONST(F_OK, int) - PSI_CONST(R_OK, int) - PSI_CONST(W_OK, int) - PSI_CONST(X_OK, int) - PSI_CONST(STDERR_FILENO, int) - PSI_CONST(STDIN_FILENO, int) - PSI_CONST(STDOUT_FILENO, int) - PSI_CONST(_CS_PATH, int) - PSI_CONST(_CS_POSIX_V6_ILP32_OFF32_CFLAGS, int) - PSI_CONST(_CS_POSIX_V6_ILP32_OFF32_LDFLAGS, int) - PSI_CONST(_CS_POSIX_V6_ILP32_OFF32_LIBS, int) - PSI_CONST(_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, int) - PSI_CONST(_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, int) - PSI_CONST(_CS_POSIX_V6_ILP32_OFFBIG_LIBS, int) - PSI_CONST(_CS_POSIX_V6_LP64_OFF64_CFLAGS, int) - PSI_CONST(_CS_POSIX_V6_LP64_OFF64_LDFLAGS, int) - PSI_CONST(_CS_POSIX_V6_LP64_OFF64_LIBS, int) - PSI_CONST(_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, int) - PSI_CONST(_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, int) - PSI_CONST(_CS_POSIX_V6_LPBIG_OFFBIG_LIBS, int) - PSI_CONST(_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS, int) - PSI_CONST(_CS_POSIX_V7_ILP32_OFF32_CFLAGS, int) - PSI_CONST(_CS_POSIX_V7_ILP32_OFF32_LDFLAGS, int) - PSI_CONST(_CS_POSIX_V7_ILP32_OFF32_LIBS, int) - PSI_CONST(_CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, int) - PSI_CONST(_CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, int) - PSI_CONST(_CS_POSIX_V7_ILP32_OFFBIG_LIBS, int) - PSI_CONST(_CS_POSIX_V7_LP64_OFF64_CFLAGS, int) - PSI_CONST(_CS_POSIX_V7_LP64_OFF64_LDFLAGS, int) - PSI_CONST(_CS_POSIX_V7_LP64_OFF64_LIBS, int) - PSI_CONST(_CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, int) - PSI_CONST(_CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, int) - PSI_CONST(_CS_POSIX_V7_LPBIG_OFFBIG_LIBS, int) - PSI_CONST(_CS_POSIX_V7_THREADS_CFLAGS, int) - PSI_CONST(_CS_POSIX_V7_THREADS_LDFLAGS, int) - PSI_CONST(_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS, int) - PSI_CONST(_CS_V6_ENV, int) - PSI_CONST(_CS_V7_ENV, int) - PSI_CONST(_PC_2_SYMLINKS, int) - PSI_CONST(_PC_ALLOC_SIZE_MIN, int) - PSI_CONST(_PC_ASYNC_IO, int) - PSI_CONST(_PC_CHOWN_RESTRICTED, int) - PSI_CONST(_PC_FILESIZEBITS, int) - PSI_CONST(_PC_LINK_MAX, int) - PSI_CONST(_PC_MAX_CANON, int) - PSI_CONST(_PC_MAX_INPUT, int) - PSI_CONST(_PC_NAME_MAX, int) - PSI_CONST(_PC_NO_TRUNC, int) - PSI_CONST(_PC_PATH_MAX, int) - PSI_CONST(_PC_PIPE_BUF, int) - PSI_CONST(_PC_PRIO_IO, int) - PSI_CONST(_PC_REC_INCR_XFER_SIZE, int) - PSI_CONST(_PC_REC_MAX_XFER_SIZE, int) - PSI_CONST(_PC_REC_MIN_XFER_SIZE, int) - PSI_CONST(_PC_REC_XFER_ALIGN, int) - PSI_CONST(_PC_SYMLINK_MAX, int) - PSI_CONST(_PC_SYNC_IO, int) - PSI_CONST(_PC_TIMESTAMP_RESOLUTION, int) - PSI_CONST(_PC_VDISABLE, int) - PSI_CONST(_POSIX2_CHAR_TERM, int) - PSI_CONST(_POSIX2_C_BIND, int) - PSI_CONST(_POSIX2_C_DEV, int) - PSI_CONST(_POSIX2_FORT_DEV, int) - PSI_CONST(_POSIX2_FORT_RUN, int) - PSI_CONST(_POSIX2_LOCALEDEF, int) - PSI_CONST(_POSIX2_PBS, int) - PSI_CONST(_POSIX2_PBS_ACCOUNTING, int) - PSI_CONST(_POSIX2_PBS_CHECKPOINT, int) - PSI_CONST(_POSIX2_PBS_LOCATE, int) - PSI_CONST(_POSIX2_PBS_MESSAGE, int) - PSI_CONST(_POSIX2_PBS_TRACK, int) - PSI_CONST(_POSIX2_SW_DEV, int) - PSI_CONST(_POSIX2_SYMLINKS, int) - PSI_CONST(_POSIX2_UPE, int) - PSI_CONST(_POSIX2_VERSION, int) - PSI_CONST(_POSIX_ADVISORY_INFO, int) - PSI_CONST(_POSIX_ASYNCHRONOUS_IO, int) - PSI_CONST(_POSIX_ASYNC_IO, int) - PSI_CONST(_POSIX_BARRIERS, int) - PSI_CONST(_POSIX_CHOWN_RESTRICTED, int) - PSI_CONST(_POSIX_CLOCK_SELECTION, int) - PSI_CONST(_POSIX_CPUTIME, int) - PSI_CONST(_POSIX_FSYNC, int) - PSI_CONST(_POSIX_IPV6, int) - PSI_CONST(_POSIX_JOB_CONTROL, int) - PSI_CONST(_POSIX_MAPPED_FILES, int) - PSI_CONST(_POSIX_MEMLOCK, int) - PSI_CONST(_POSIX_MEMLOCK_RANGE, int) - PSI_CONST(_POSIX_MEMORY_PROTECTION, int) - PSI_CONST(_POSIX_MESSAGE_PASSING, int) - PSI_CONST(_POSIX_MONOTONIC_CLOCK, int) - PSI_CONST(_POSIX_NO_TRUNC, int) - PSI_CONST(_POSIX_PRIORITIZED_IO, int) - PSI_CONST(_POSIX_PRIORITY_SCHEDULING, int) - PSI_CONST(_POSIX_PRIO_IO, int) - PSI_CONST(_POSIX_RAW_SOCKETS, int) - PSI_CONST(_POSIX_READER_WRITER_LOCKS, int) - PSI_CONST(_POSIX_REALTIME_SIGNALS, int) - PSI_CONST(_POSIX_REGEXP, int) - PSI_CONST(_POSIX_SAVED_IDS, int) - PSI_CONST(_POSIX_SEMAPHORES, int) - PSI_CONST(_POSIX_SHARED_MEMORY_OBJECTS, int) - PSI_CONST(_POSIX_SHELL, int) - PSI_CONST(_POSIX_SPAWN, int) - PSI_CONST(_POSIX_SPIN_LOCKS, int) - PSI_CONST(_POSIX_SPORADIC_SERVER, int) - PSI_CONST(_POSIX_SYNCHRONIZED_IO, int) - PSI_CONST(_POSIX_SYNC_IO, int) - PSI_CONST(_POSIX_THREADS, int) - PSI_CONST(_POSIX_THREAD_ATTR_STACKADDR, int) - PSI_CONST(_POSIX_THREAD_ATTR_STACKSIZE, int) - PSI_CONST(_POSIX_THREAD_CPUTIME, int) - PSI_CONST(_POSIX_THREAD_PRIORITY_SCHEDULING, int) - PSI_CONST(_POSIX_THREAD_PRIO_INHERIT, int) - PSI_CONST(_POSIX_THREAD_PRIO_PROTECT, int) - PSI_CONST(_POSIX_THREAD_PROCESS_SHARED, int) - PSI_CONST(_POSIX_THREAD_ROBUST_PRIO_INHERIT, int) - PSI_CONST(_POSIX_THREAD_ROBUST_PRIO_PROTECT, int) - PSI_CONST(_POSIX_THREAD_SAFE_FUNCTIONS, int) - PSI_CONST(_POSIX_THREAD_SPORADIC_SERVER, int) - PSI_CONST(_POSIX_TIMEOUTS, int) - PSI_CONST(_POSIX_TIMERS, int) - PSI_CONST(_POSIX_TIMESTAMP_RESOLUTION, int) - PSI_CONST(_POSIX_TRACE, int) - PSI_CONST(_POSIX_TRACE_EVENT_FILTER, int) - PSI_CONST(_POSIX_TRACE_INHERIT, int) - PSI_CONST(_POSIX_TRACE_LOG, int) - PSI_CONST(_POSIX_TYPED_MEMORY_OBJECTS, int) - PSI_CONST(_POSIX_V6_ILP32_OFF32, int) - PSI_CONST(_POSIX_V6_ILP32_OFFBIG, int) - PSI_CONST(_POSIX_V6_LP64_OFF64, int) - PSI_CONST(_POSIX_V6_LPBIG_OFFBIG, int) - PSI_CONST(_POSIX_V7_ILP32_OFF32, int) - PSI_CONST(_POSIX_V7_ILP32_OFFBIG, int) - PSI_CONST(_POSIX_V7_LP64_OFF64, int) - PSI_CONST(_POSIX_V7_LPBIG_OFFBIG, int) - PSI_CONST(_POSIX_VDISABLE, int) - PSI_CONST(_POSIX_VERSION, int) - PSI_CONST(_SC_2_CHAR_TERM, int) - PSI_CONST(_SC_2_C_BIND, int) - PSI_CONST(_SC_2_C_DEV, int) - PSI_CONST(_SC_2_FORT_DEV, int) - PSI_CONST(_SC_2_FORT_RUN, int) - PSI_CONST(_SC_2_LOCALEDEF, int) - PSI_CONST(_SC_2_PBS, int) - PSI_CONST(_SC_2_PBS_ACCOUNTING, int) - PSI_CONST(_SC_2_PBS_CHECKPOINT, int) - PSI_CONST(_SC_2_PBS_LOCATE, int) - PSI_CONST(_SC_2_PBS_MESSAGE, int) - PSI_CONST(_SC_2_PBS_TRACK, int) - PSI_CONST(_SC_2_SW_DEV, int) - PSI_CONST(_SC_2_UPE, int) - PSI_CONST(_SC_2_VERSION, int) - PSI_CONST(_SC_ADVISORY_INFO, int) - PSI_CONST(_SC_AIO_LISTIO_MAX, int) - PSI_CONST(_SC_AIO_MAX, int) - PSI_CONST(_SC_AIO_PRIO_DELTA_MAX, int) - PSI_CONST(_SC_ARG_MAX, int) - PSI_CONST(_SC_ASYNCHRONOUS_IO, int) - PSI_CONST(_SC_ATEXIT_MAX, int) - PSI_CONST(_SC_BARRIERS, int) - PSI_CONST(_SC_BC_BASE_MAX, int) - PSI_CONST(_SC_BC_DIM_MAX, int) - PSI_CONST(_SC_BC_SCALE_MAX, int) - PSI_CONST(_SC_BC_STRING_MAX, int) - PSI_CONST(_SC_CHILD_MAX, int) - PSI_CONST(_SC_CLK_TCK, int) - PSI_CONST(_SC_CLOCK_SELECTION, int) - PSI_CONST(_SC_COLL_WEIGHTS_MAX, int) - PSI_CONST(_SC_CPUTIME, int) - PSI_CONST(_SC_DELAYTIMER_MAX, int) - PSI_CONST(_SC_EXPR_NEST_MAX, int) - PSI_CONST(_SC_FSYNC, int) - PSI_CONST(_SC_GETGR_R_SIZE_MAX, int) - PSI_CONST(_SC_GETPW_R_SIZE_MAX, int) - PSI_CONST(_SC_HOST_NAME_MAX, int) - PSI_CONST(_SC_IOV_MAX, int) - PSI_CONST(_SC_IPV6, int) - PSI_CONST(_SC_JOB_CONTROL, int) - PSI_CONST(_SC_LINE_MAX, int) - PSI_CONST(_SC_LOGIN_NAME_MAX, int) - PSI_CONST(_SC_MAPPED_FILES, int) - PSI_CONST(_SC_MEMLOCK, int) - PSI_CONST(_SC_MEMLOCK_RANGE, int) - PSI_CONST(_SC_MEMORY_PROTECTION, int) - PSI_CONST(_SC_MESSAGE_PASSING, int) - PSI_CONST(_SC_MONOTONIC_CLOCK, int) - PSI_CONST(_SC_MQ_OPEN_MAX, int) - PSI_CONST(_SC_MQ_PRIO_MAX, int) - PSI_CONST(_SC_NGROUPS_MAX, int) - PSI_CONST(_SC_OPEN_MAX, int) - PSI_CONST(_SC_PAGESIZE, int) - PSI_CONST(_SC_PAGE_SIZE, int) - PSI_CONST(_SC_PRIORITIZED_IO, int) - PSI_CONST(_SC_PRIORITY_SCHEDULING, int) - PSI_CONST(_SC_RAW_SOCKETS, int) - PSI_CONST(_SC_READER_WRITER_LOCKS, int) - PSI_CONST(_SC_REALTIME_SIGNALS, int) - PSI_CONST(_SC_REGEXP, int) - PSI_CONST(_SC_RE_DUP_MAX, int) - PSI_CONST(_SC_RTSIG_MAX, int) - PSI_CONST(_SC_SAVED_IDS, int) - PSI_CONST(_SC_SEMAPHORES, int) - PSI_CONST(_SC_SEM_NSEMS_MAX, int) - PSI_CONST(_SC_SEM_VALUE_MAX, int) - PSI_CONST(_SC_SHARED_MEMORY_OBJECTS, int) - PSI_CONST(_SC_SHELL, int) - PSI_CONST(_SC_SIGQUEUE_MAX, int) - PSI_CONST(_SC_SPAWN, int) - PSI_CONST(_SC_SPIN_LOCKS, int) - PSI_CONST(_SC_SPORADIC_SERVER, int) - PSI_CONST(_SC_SS_REPL_MAX, int) - PSI_CONST(_SC_STREAM_MAX, int) - PSI_CONST(_SC_SYMLOOP_MAX, int) - PSI_CONST(_SC_SYNCHRONIZED_IO, int) - PSI_CONST(_SC_THREADS, int) - PSI_CONST(_SC_THREAD_ATTR_STACKADDR, int) - PSI_CONST(_SC_THREAD_ATTR_STACKSIZE, int) - PSI_CONST(_SC_THREAD_CPUTIME, int) - PSI_CONST(_SC_THREAD_DESTRUCTOR_ITERATIONS, int) - PSI_CONST(_SC_THREAD_KEYS_MAX, int) - PSI_CONST(_SC_THREAD_PRIORITY_SCHEDULING, int) - PSI_CONST(_SC_THREAD_PRIO_INHERIT, int) - PSI_CONST(_SC_THREAD_PRIO_PROTECT, int) - PSI_CONST(_SC_THREAD_PROCESS_SHARED, int) - PSI_CONST(_SC_THREAD_ROBUST_PRIO_INHERIT, int) - PSI_CONST(_SC_THREAD_ROBUST_PRIO_PROTECT, int) - PSI_CONST(_SC_THREAD_SAFE_FUNCTIONS, int) - PSI_CONST(_SC_THREAD_SPORADIC_SERVER, int) - PSI_CONST(_SC_THREAD_STACK_MIN, int) - PSI_CONST(_SC_THREAD_THREADS_MAX, int) - PSI_CONST(_SC_TIMEOUTS, int) - PSI_CONST(_SC_TIMERS, int) - PSI_CONST(_SC_TIMER_MAX, int) - PSI_CONST(_SC_TRACE, int) - PSI_CONST(_SC_TRACE_EVENT_FILTER, int) - PSI_CONST(_SC_TRACE_EVENT_NAME_MAX, int) - PSI_CONST(_SC_TRACE_INHERIT, int) - PSI_CONST(_SC_TRACE_LOG, int) - PSI_CONST(_SC_TRACE_NAME_MAX, int) - PSI_CONST(_SC_TRACE_SYS_MAX, int) - PSI_CONST(_SC_TRACE_USER_EVENT_MAX, int) - PSI_CONST(_SC_TTY_NAME_MAX, int) - PSI_CONST(_SC_TYPED_MEMORY_OBJECTS, int) - PSI_CONST(_SC_TZNAME_MAX, int) - PSI_CONST(_SC_V6_ILP32_OFF32, int) - PSI_CONST(_SC_V6_ILP32_OFFBIG, int) - PSI_CONST(_SC_V6_LP64_OFF64, int) - PSI_CONST(_SC_V6_LPBIG_OFFBIG, int) - PSI_CONST(_SC_V7_ILP32_OFF32, int) - PSI_CONST(_SC_V7_ILP32_OFFBIG, int) - PSI_CONST(_SC_V7_LP64_OFF64, int) - PSI_CONST(_SC_V7_LPBIG_OFFBIG, int) - PSI_CONST(_SC_VERSION, int) - PSI_CONST(_SC_XOPEN_CRYPT, int) - PSI_CONST(_SC_XOPEN_ENH_I18N, int) - PSI_CONST(_SC_XOPEN_REALTIME, int) - PSI_CONST(_SC_XOPEN_REALTIME_THREADS, int) - PSI_CONST(_SC_XOPEN_SHM, int) - PSI_CONST(_SC_XOPEN_STREAMS, int) - PSI_CONST(_SC_XOPEN_UNIX, int) - PSI_CONST(_SC_XOPEN_UUCP, int) - PSI_CONST(_SC_XOPEN_VERSION, int) - PSI_CONST(_XOPEN_CRYPT, int) - PSI_CONST(_XOPEN_ENH_I18N, int) - PSI_CONST(_XOPEN_REALTIME, int) - PSI_CONST(_XOPEN_REALTIME_THREADS, int) - PSI_CONST(_XOPEN_SHM, int) - PSI_CONST(_XOPEN_STREAMS, int) - PSI_CONST(_XOPEN_UNIX, int) - PSI_CONST(_XOPEN_UUCP, int) - PSI_CONST(_XOPEN_VERSION, int) - - PSI_EXTVAR(char *optarg) - PSI_EXTVAR(int opterr) - PSI_EXTVAR(int optind) - PSI_EXTVAR(int optopt) - PSI_EXTVAR(int optreset) - - PSI_DECL(int access, [(const char *path, int amode)]) - PSI_DECL(unsigned alarm, [(unsigned seconds)]) - PSI_DECL(int chdir, [(const char *path)]) - PSI_DECL(int chown, [(const char *path, uid_t owner, gid_t group)]) - PSI_DECL(int close, [(int fildes)]) - PSI_DECL(size_t confstr, [(int name, char *buf, size_t len)]) - PSI_DECL(char *crypt, [(const char *key, const char *salt)], [], [-lcrypt]) - PSI_DECL(int dup, [(int fildes)]) - PSI_DECL(int dup2, [(int fildes, int fildes2)]) - PSI_DECL(void encrypt, [(char block@<:@64@:>@, int edflag)], [], [-lcrypt]) - PSI_DECL(void _exit, [(int status)]) - PSI_DECL(int execl, [(const char *path, const char *arg)], vararg) - PSI_DECL(int execle, [(const char *path, const char *arg)], vararg) - PSI_DECL(int execlp, [(const char *file, const char *arg)], vararg) - PSI_DECL(int execv, [(const char *path, char **argv)]) - PSI_DECL(int execve, [(const char *path, char **argv, char **envp)]) - PSI_DECL(int execvp, [(const char *file, char **argv)]) - PSI_DECL(int faccessat, [(int fd, const char *path, int amode, int flag)]) - PSI_DECL(int fchdir, [(int fildes)]) - PSI_DECL(int fchown, [(int fildes, uid_t owner, gid_t group)]) - PSI_DECL(int fchownat, [(int fd, const char *path, uid_t owner, gid_t group, int flag)]) - PSI_DECL(int fdatasync, [(int fildes)]) - PSI_DECL(int fexecve, [(int fd, char **argv, char **envp)]) - PSI_DECL(pid_t fork, [(void)]) - PSI_DECL(long fpathconf, [(int fd, int name)]) - PSI_DECL(int fsync, [(int fildes)]) - PSI_DECL(int ftruncate, [(int fildes, off_t length)]) - PSI_DECL(char *getcwd, [(char *buf, size_t size)]) - PSI_DECL(gid_t getegid, [(void)]) - PSI_DECL(uid_t geteuid, [(void)]) - PSI_DECL(gid_t getgid, [(void)]) - PSI_DECL(int getgroups, [(int gidsetsize, gid_t *grouplist)]) - PSI_DECL(long gethostid, [(void)]) - PSI_DECL(int gethostname, [(char * name, size_t namelen)]) - PSI_DECL(char *getlogin, [(void)]) - PSI_DECL(int getlogin_r, [(char *buf, size_t bufsize)]) - PSI_DECL(int getopt, [(int argc, char **argv, const char *optstring)]) - PSI_DECL(pid_t getpgid, [(pid_t pid)]) - PSI_DECL(pid_t getpgrp, [(void)]) - PSI_DECL(pid_t getpid, [(void)]) - PSI_DECL(pid_t getppid, [(void)]) - PSI_DECL(pid_t getsid, [(pid_t pid)]) - PSI_DECL(uid_t getuid, [(void)]) - PSI_DECL(int isatty, [(int fd)]) - PSI_DECL(int lchown, [(const char *path, uid_t owner, gid_t group)]) - PSI_DECL(int link, [(const char *path1, const char *path2)]) - PSI_DECL(int linkat, [(int fd1, const char *path1, int fd2, const char *path2, int flag)]) - PSI_DECL(int lockf, [(int fd, int cmd, off_t len)]) - PSI_DECL(off_t lseek, [(int fildes, off_t offset, int whence)]) - PSI_DECL(int nice, [(int incr)]) - PSI_DECL(long pathconf, [(const char *path, int name)]) - PSI_DECL(int pause, [(void)]) - PSI_DECL(int pipe, [(int fildes@<:@2@:>@)]) - PSI_DECL(ssize_t pread, [(int fildes, void *buf, size_t nbyte, off_t offset)]) - PSI_DECL(ssize_t pwrite, [(int fildes, const void *buf, size_t nbyte, off_t offset)]) - PSI_DECL(ssize_t read, [(int fd, void *buf, size_t count)]) - PSI_DECL(ssize_t readlink, [(const char *path, char *buf, size_t bufsize)]) - PSI_DECL(ssize_t readlinkat, [(int fd, const char *path, char *buf, size_t bufsize)]) - PSI_DECL(int rmdir, [(const char *path)]) - PSI_DECL(int setegid, [(gid_t gid)]) - PSI_DECL(int seteuid, [(uid_t uid)]) - PSI_DECL(int setgid, [(gid_t gid)]) - PSI_DECL(int setpgid, [(pid_t pid, pid_t pgid)]) - PSI_DECL(pid_t setpgrp, [(void)]) - PSI_DECL(int setregid, [(gid_t rgid, gid_t egid)]) - PSI_DECL(int setreuid, [(uid_t ruid, uid_t euid)]) - PSI_DECL(pid_t setsid, [(void)]) - PSI_DECL(int setuid, [(uid_t uid)]) - PSI_DECL(unsigned sleep, [(unsigned seconds)]) - PSI_DECL(void swab, [(const void *from, void *to, ssize_t n)]) - PSI_DECL(int symlink, [(const char *path1, const char *path2)]) - PSI_DECL(int symlinkat, [(const char *path1, int fd, const char *path2)]) - PSI_DECL(void sync, [(void)]) - PSI_DECL(long sysconf, [(int name)]) - PSI_DECL(pid_t tcgetpgrp, [(int fd)]) - PSI_DECL(int tcsetpgrp, [(int fd, pid_t pgrp)]) - PSI_DECL(int truncate, [(const char *path, off_t length)]) - PSI_DECL(char *ttyname, [(int fd)]) - PSI_DECL(int ttyname_r, [(int fd, char *buf, size_t buflen)]) - PSI_DECL(int unlink, [(const char *path)]) - PSI_DECL(int unlinkat, [(int fd, const char *path, int flag)]) - PSI_DECL(ssize_t write, [(int fildes, const void *buf, size_t nbyte)]) - - -} diff --git a/m4/posix/wchar.m4 b/m4/posix/wchar.m4 deleted file mode 100644 index f5932ef..0000000 --- a/m4/posix/wchar.m4 +++ /dev/null @@ -1,78 +0,0 @@ -PSI_CHECK_WCHAR() { - - PSI_TYPE(wint_t, int) - PSI_STRUCT(mbstate_t) - - PSI_CONST(WINT_MIN, int) - PSI_CONST(WINT_MAX, int) - PSI_CONST(WEOF, int) - - PSI_DECL(wint_t btowc, [(int c)]) - PSI_DECL(wint_t fgetwc, [(FILE *stream)]) - PSI_DECL(wchar_t *fgetws, [(wchar_t *ws, int n, FILE *stream)]) - PSI_DECL(wint_t fputwc, [(wchar_t c, FILE *stream)]) - PSI_DECL(int fputws, [(const wchar_t *ws, FILE *stream)]) - PSI_DECL(int fwide, [(FILE *stream, int mode)]) - PSI_DECL(int fwprintf, [(FILE *stream, const wchar_t *format)], vararg) - PSI_DECL(int fwscanf, [(FILE *stream, const wchar_t *format)], vararg) - PSI_DECL(wint_t getwc, [(FILE *stream)]) - PSI_DECL(wint_t getwchar, [(void)]) - PSI_DECL(size_t mbrlen, [(const char *s, size_t n, mbstate_t *ps)]) - PSI_DECL(size_t mbrtowc, [(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)]) - PSI_DECL(int mbsinit, [(const mbstate_t *ps)]) - PSI_DECL(size_t mbsnrtowcs, [(wchar_t *dst, const char **src, size_t nms, size_t len, mbstate_t *ps)]) - PSI_DECL(size_t mbsrtowcs, [(wchar_t *dst, const char **src, size_t len, mbstate_t *ps)]) - PSI_DECL(FILE *open_wmemstream, [(wchar_t **ptr, size_t *size)]) - PSI_DECL(wint_t putwc, [(wchar_t wc, FILE *stream)]) - PSI_DECL(wint_t putwchar, [(wchar_t wc)]) - PSI_DECL(int swprintf, [(wchar_t *wcs, size_t maxlen, const wchar_t *format)], vararg) - PSI_DECL(int swscanf, [(const wchar_t *ws, const wchar_t *format)], vararg) - PSI_DECL(wint_t ungetwc, [(wint_t wc, FILE *stream)]) - PSI_DECL(wchar_t *wcpcpy, [(wchar_t *dest, const wchar_t *src)]) - PSI_DECL(wchar_t *wcpncpy, [(wchar_t *dest, const wchar_t *src, size_t n)]) - PSI_DECL(size_t wcrtomb, [(char *s, wchar_t wc, mbstate_t *ps)]) - PSI_DECL(int wcscasecmp, [(const wchar_t *s1, const wchar_t *s2)]) - PSI_DECL(int wcscasecmp_l, [(const wchar_t *s1, const wchar_t *s2, locale_t loc)]) - PSI_DECL(wchar_t *wcscat, [(wchar_t *dest, const wchar_t *src)]) - PSI_DECL(wchar_t *wcschr, [(const wchar_t *wcs, wchar_t wc)]) - PSI_DECL(int wcscmp, [(const wchar_t *s1, const wchar_t *s2)]) - PSI_DECL(int wcscoll, [(const wchar_t *s1, const wchar_t *s2)]) - PSI_DECL(int wcscoll_l, [(const wchar_t *s1, const wchar_t *s2, locale_t loc)]) - PSI_DECL(wchar_t *wcscpy, [(wchar_t *dest, const wchar_t *src)]) - PSI_DECL(size_t wcscspn, [(const wchar_t *wcs, const wchar_t *reject)]) - PSI_DECL(wchar_t *wcsdup, [(const wchar_t *s)]) - PSI_DECL(size_t wcsftime, [(wchar_t *wcs, size_t maxsize, const wchar_t *format, const struct tm *timeptr)]) - PSI_DECL(size_t wcslen, [(const wchar_t *s)]) - PSI_DECL(int wcsncasecmp, [(const wchar_t *s1, const wchar_t *s2, size_t n)]) - PSI_DECL(int wcsncasecmp_l, [(const wchar_t *s1, const wchar_t *s2, size_t n, locale_t loc)]) - PSI_DECL(wchar_t *wcsncat, [(wchar_t *dest, const wchar_t *src, size_t n)]) - PSI_DECL(int wcsncmp, [(const wchar_t *s1, const wchar_t *s2, size_t n)]) - PSI_DECL(wchar_t *wcsncpy, [(wchar_t *dest, const wchar_t *src, size_t n)]) - PSI_DECL(size_t wcsnlen, [(const wchar_t *s, size_t maxlen)]) - PSI_DECL(size_t wcsnrtombs, [(char *dest, const wchar_t **src, size_t nwc, size_t len, mbstate_t *ps)]) - PSI_DECL(wchar_t *wcspbrk, [(const wchar_t *wcs, const wchar_t *accept)]) - PSI_DECL(wchar_t *wcsrchr, [(const wchar_t *wcs, wchar_t wc)]) - PSI_DECL(size_t wcsrtombs, [(char *dest, const wchar_t **src, size_t n, mbstate_t *ps)]) - PSI_DECL(size_t wcsspn, [(const wchar_t *wcs, const wchar_t *accept)]) - PSI_DECL(wchar_t *wcsstr, [(const wchar_t *haystack, const wchar_t *needle)]) - PSI_DECL(double wcstod, [(const wchar_t *nptr, wchar_t **endptr)]) - PSI_DECL(float wcstof, [(const wchar_t *nptr, wchar_t **endptr)]) - PSI_DECL(wchar_t *wcstok, [(wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)]) - PSI_DECL(long wcstol, [(const wchar_t *nptr, wchar_t **endptr, int base)]) - PSI_DECL(long double wcstold, [(const wchar_t *nptr, wchar_t **endptr)]) - PSI_DECL(long long wcstoll, [(const wchar_t *nptr, wchar_t **endptr, int base)]) - PSI_DECL(unsigned long wcstoul, [(const wchar_t *nptr, wchar_t **endptr, int base)]) - PSI_DECL(unsigned long long wcstoull, [(const wchar_t *nptr, wchar_t **endptr, int base)]) - PSI_DECL(int wcswidth, [(const wchar_t *s, size_t n)]) - PSI_DECL(size_t wcsxfrm, [(wchar_t *ws1, const wchar_t *ws2, size_t n)]) - PSI_DECL(size_t wcsxfrm_l, [(wchar_t *ws1, const wchar_t *ws2, size_t n, locale_t loc)]) - PSI_DECL(int wctob, [(wint_t c)]) - PSI_DECL(int wcwidth, [(wchar_t c)]) - PSI_DECL(wchar_t *wmemchr, [(const wchar_t *s, wchar_t c, size_t n)]) - PSI_DECL(int wmemcmp, [(const wchar_t *s1, const wchar_t *s2, size_t n)]) - PSI_DECL(wchar_t *wmemcpy, [(wchar_t *dest, const wchar_t *src, size_t n)]) - PSI_DECL(wchar_t *wmemmove, [(wchar_t *dest, const wchar_t *src, size_t n)]) - PSI_DECL(wchar_t *wmemset, [(wchar_t *wcs, wchar_t wc, size_t n)]) - PSI_DECL(int wprintf, [(const wchar_t *format)], vararg) - PSI_DECL(int wscanf, [(const wchar_t *format)], vararg) -} diff --git a/m4/posix/wctype.m4 b/m4/posix/wctype.m4 deleted file mode 100644 index 530c165..0000000 --- a/m4/posix/wctype.m4 +++ /dev/null @@ -1,41 +0,0 @@ -PSI_CHECK_WCTYPE() { - - PSI_TYPE(wctype_t, int) - PSI_TYPE(wctrans_t, int) - - PSI_DECL(int iswalnum, [(wint_t wc)]) - PSI_DECL(int iswalpha, [(wint_t wc)]) - PSI_DECL(int iswcntrl, [(wint_t wc)]) - PSI_DECL(int iswctype, [(wint_t wc, wctype_t class)]) - PSI_DECL(int iswdigit, [(wint_t wc)]) - PSI_DECL(int iswgraph, [(wint_t wc)]) - PSI_DECL(int iswlower, [(wint_t wc)]) - PSI_DECL(int iswprint, [(wint_t wc)]) - PSI_DECL(int iswpunct, [(wint_t wc)]) - PSI_DECL(int iswspace, [(wint_t wc)]) - PSI_DECL(int iswupper, [(wint_t wc)]) - PSI_DECL(int iswxdigit, [(wint_t wc)]) - PSI_DECL(wint_t towlower, [(wint_t wc)]) - PSI_DECL(wint_t towupper, [(wint_t wc)]) - PSI_DECL(wint_t towctrans, [(wint_t wc, wctrans_t desc)]) - PSI_DECL(wctype_t wctype, [(const char *name)]) - PSI_DECL(wctrans_t wctrans, [(const char *class)]) - - PSI_DECL(int iswalnum_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(int iswalpha_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(int iswcntrl_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(int iswctype_l, [(wint_t wc_l, wctype_t class, locale_t loc)]) - PSI_DECL(int iswdigit_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(int iswgraph_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(int iswlower_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(int iswprint_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(int iswpunct_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(int iswspace_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(int iswupper_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(int iswxdigit_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(wint_t towlower_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(wint_t towupper_l, [(wint_t wc, locale_t loc)]) - PSI_DECL(wint_t towctrans_l, [(wint_t wc, wctrans_t desc, locale_t loc)]) - PSI_DECL(wctype_t wctype_l, [(const char *name, locale_t loc)]) - PSI_DECL(wctrans_t wctrans_l, [(const char *class, locale_t loc)]) -} diff --git a/m4/psi/psi.m4 b/m4/psi/psi.m4 index ba86907..f292c3e 100644 --- a/m4/psi/psi.m4 +++ b/m4/psi/psi.m4 @@ -10,14 +10,6 @@ AC_DEFUN(PSI_CONFIG_INIT, [ ac_includes_default="AC_INCLUDES_DEFAULT" AC_PROG_AWK - AC_PATH_PROG(NM, nm) - AC_CACHE_CHECK(for libc start main symbol, psi_cv_libc_main, [ - psi_libc_main= - AC_TRY_LINK(PSI_INCLUDES, [(void)0;], [ - psi_libc_main=`nm -g conftest$ac_exeext | $AWK -F ' *|@' '/^@<:@@<:@:space:@:>@@:>@+U / {print$[]3; exit}'` - ]) - psi_cv_libc_main=$psi_libc_main - ]) AC_MSG_CHECKING(for preprocessor defaults) psi_cpp_predef=`$CPP -Wp,-dM $CPPFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 - &2 - exit 1 - fi -]) - dnl PSI_CONFIG_DONE() dnl Finish the headers with the pre-defined types etc. AC_DEFUN(PSI_CONFIG_DONE, [ - PSI_CONFIG_WAIT - - if $PSI_FAST_CONFIG; then - for conf_env in $PSI_CONFIG_TMP/*/conf.env; do - if test "$conf_env" != "$PSI_CONFIG_TMP/*/conf.env"; then - source $conf_env - fi - done - fi - psi_eval_LIBS=$LIBS LIBS=$psi_save_LIBS PHP_EVAL_LIBLINE($psi_eval_LIBS, PSI_SHARED_LIBADD) @@ -119,118 +75,11 @@ AC_DEFUN(PSI_CONFIG_DONE, [ [PSI_INCLUDES]="PSI_INCLUDES" AC_SUBST([PSI_INCLUDES]) AC_SUBST([PSI_STDTYPES]) - AC_SUBST([PSI_TYPES]) - AC_SUBST([PSI_COMPOSITES]) AC_SUBST([PSI_CONSTS]) - AC_SUBST([PSI_REDIRS]) - AC_SUBST([PSI_MACROS]) - AC_SUBST([PSI_DECLS]) AC_SUBST([PSI_CPP_SEARCH]) AC_SUBST([PSI_CPP_PREDEF]) ]) -dnl PSI_SH_CONFIG_POSIX_ENABLED(section) -dnl Expand to $psi_config_posix_
-AC_DEFUN(PSI_SH_CONFIG_POSIX_ENABLED, [$AS_TR_SH([psi_config_posix_]$1)]) - -dnl PSI_CONFIG_POSIX_ENABLED(section, action-if-yes, action-if-not) -dnl Internal. Used to check if --enable-psi-posix=section was given. -AC_DEFUN(PSI_CONFIG_POSIX_ENABLED, [ - AS_TR_SH([psi_config_posix_]$1)=false - case "$PHP_PSI_POSIX" in - yes|all) - AS_TR_SH([psi_config_posix_]$1)=true - ;; - *) - if expr "$PHP_PSI_POSIX" : '.*\b$1\b' >/dev/null; then - AS_TR_SH([psi_config_posix_]$1)=true - fi - ;; - esac - if $AS_TR_SH([psi_config_posix_]$1); then - ifelse([$2],,:,[$2]) - else - ifelse([$3],,:,[$3]) - fi -]) - -dnl PSI_TEST_POSIX_ENABLED(section, action-if-yes, action-if-not) -dnl Shell-if test if PSI POSIX section was configured. -AC_DEFUN(PSI_SH_TEST_POSIX_ENABLED, [ - if test "PSI_SH_CONFIG_POSIX_ENABLED([$1])" && $PSI_SH_CONFIG_POSIX_ENABLED([$1]); then - ifelse([$2],,:,[$2]) - else - ifelse([$3],,:,[$3]) - fi -]) - -dnl PSI_CONFIG_POSIX(section, headers, dependents) -AC_DEFUN(PSI_CONFIG_POSIX, [ - PSI_CONFIG_POSIX_ENABLED($1, [ - if $PSI_FAST_CONFIG; then - PSI_CONFIG_POSIX_PARALLEL($1, $2, [$3]) - else - ifelse([$2],,:,[AC_CHECK_HEADERS($2)]) - AS_TR_CPP([PSI_CHECK_$1]) - $3 - fi - ]) -]) - -AC_DEFUN([PSI_CONFIG_POSIX_PARALLEL], [ - ( - dnl chaway - mkdir $PSI_CONFIG_TMP/AS_TR_SH([$1]) - cd $PSI_CONFIG_TMP/AS_TR_SH([$1]) - - dnl AC_DEFINEs - ln -s $abs_builddir/confdefs.h confdefs.h - - dnl STDOUT, STDERR - exec {PSI_MESSAGE_FD}>&AS_MESSAGE_FD {PSI_ERROR_FD}>&2 - exec AS_MESSAGE_FD>stdout.log 2>stderr.log - - dnl check for headers? - ifelse([$2],,:,[AC_CHECK_HEADERS($2)]) - - dnl run checks - PSI_TYPES= - PSI_CONSTS= - PSI_COMPOSITES= - PSI_REDIRS= - PSI_MACROS= - PSI_DECLS= - AS_TR_CPP([PSI_CHECK_$1]) - - dnl save env - cat >conf.env <>conf.env <>conf.env - dnl restore STDOUT,STDERR - exec AS_MESSAGE_FD>&$PSI_MESSAGE_FD 2>&$PSI_ERROR_FD - - dnl done - AS_ECHO_N(["$1 "]) - cd - >/dev/null - - dnl run dependents - $3 - - PSI_CONFIG_WAIT - ) & -]) - AC_DEFUN(PSI_PTHREAD_ONCE, [ AX_PTHREAD([ LIBS="$PTHREAD_LIBS $LIBS" diff --git a/m4/psi/psi_composite.m4 b/m4/psi/psi_composite.m4 deleted file mode 100644 index ddd5d0d..0000000 --- a/m4/psi/psi_composite.m4 +++ /dev/null @@ -1,77 +0,0 @@ -# psi_add_composite(composite members) -# Add a pre-defined composite (struct or union) -psi_add_composite() { - PSI_COMPOSITES="$PSI_COMPOSITES - $1, {0}," -} - -dnl PSI_COMPOSITE_MEMBER(composite name, decl member) -dnl INTERNAL: build $psi_composite_members -AC_DEFUN(PSI_COMPOSITE_MEMBER, [ - m4_define([member_name], PSI_VAR_NAME($2)) - m4_define([member_type], PSI_VAR_TYPE($2)) - PSI_CHECK_SIZEOF(AS_TR_SH($1)[_]member_name, - [#define ]AS_TR_SH($1)[_]member_name (($1 *)0)->member_name - ) - if PSI_SH_TEST_SIZEOF($1 member_name); then - PSI_CHECK_OFFSETOF($1, member_name) - PSI_TYPE_INDIRECTION($2, [PSI_SH_SIZEOF([$1 member_name])], pl, as) - - psi_member_sizeof=PSI_SH_SIZEOF($1 member_name) - psi_member_offsetof=PSI_SH_OFFSETOF($1 member_name) - - if test $pl -gt 0 && test $as -eq 0; then - check_size=PSI_SH_SIZEOF(void *) - elif test $pl -eq 1 && test $as -gt 0; then - check_size=`expr PSI_SH_SIZEOF(member_type) \* $as` - else - check_size=PSI_SH_SIZEOF(member_type) - fi - if test $psi_member_sizeof != "$check_size"; then - psi_member_basic_type=PSI_SH_BASIC_TYPE(member_type) - psi_member_type_pair="`psi_type_pair $psi_member_basic_type $psi_member_sizeof`" - psi_composite_members="$psi_composite_members, {$psi_member_type_pair, \"[]member_name[]\", $psi_member_offsetof, $psi_member_sizeof, $pl, $as}" - AC_MSG_WARN(pre-defined size $check_size of $2 in $1 does not match computed size $psi_member_sizeof; adjusting to $psi_member_type_pair) - else - psi_composite_members="[$psi_composite_members, {]PSI_TYPE_PAIR(member_type)[, \"]member_name[\", $psi_member_offsetof, $psi_member_sizeof, $pl, $as}]" - fi - fi -]) - -dnl PSI_STRUCT(struct name, struct members) -dnl Check a struct and its members and add a pre-defined struct and possibly a -dnl pre-defined type for this struct. -dnl Calls PSI_CHECK_SIZEOF and PSI_CHECK_ALIGNOF for the struct. -dnl Calls PSI_CHECK_SIZEOF, PSI_CHECK_OFFSETOF and PSI_TYPE_INDIRECTON for each member. -AC_DEFUN(PSI_STRUCT, [ - PSI_CHECK_SIZEOF($1) - if PSI_SH_TEST_SIZEOF($1); then - PSI_CHECK_ALIGNOF($1) - psi_composite_name=m4_bregexp([$1], [^\(struct \)?\(\w+\)], [\2]) - psi_composite_members="{PSI_T_STRUCT, \"struct\", \"$psi_composite_name\", PSI_SH_ALIGNOF($1), PSI_SH_SIZEOF($1), 0, 0}" - ifelse([$2],,,[m4_map_args_sep([PSI_COMPOSITE_MEMBER($1, m4_normalize(], [))], [], $2)]) - psi_add_composite "$psi_composite_members" - if test "$1" = "$psi_composite_name"; then - psi_add_type "{PSI_T_STRUCT, \"$1\", \"$1\"}" - fi - fi -]) - -dnl PSI_UNION(union name, union/struct members) -dnl Check a union and its members and add a pre-defined union and possibly a -dnl pre-defined type for this union. -dnl Calls PSI_CHECK_SIZEOF for the union and each member. -dnl Calls PSI_CHECK_OFFSETOF and PSI_TYPE_INDIRECTON for each member. -AC_DEFUN(PSI_UNION, [ - PSI_CHECK_SIZEOF($1) - if PSI_SH_TEST_SIZEOF($1); then - PSI_CHECK_ALIGNOF($1) - psi_composite_name=m4_bregexp([$1], [^\(union \)?\(\w+\)], [\2]) - psi_composite_members="{PSI_T_UNION, \"union\", \"$psi_composite_name\", PSI_SH_ALIGNOF($1), PSI_SH_SIZEOF($1), 0, 0}" - ifelse([$2],,,[m4_map_args_sep([PSI_COMPOSITE_MEMBER($1, m4_normalize(], [))], [], $2)]) - psi_add_composite "$psi_composite_members" - if test "$1" = "$psi_composite_name"; then - psi_add_type "{PSI_T_UNION, \"$1\", \"$1\"}" - fi - fi -]) diff --git a/m4/psi/psi_decl.m4 b/m4/psi/psi_decl.m4 deleted file mode 100644 index d699dd8..0000000 --- a/m4/psi/psi_decl.m4 +++ /dev/null @@ -1,128 +0,0 @@ -# psi_add_redir(name, symbol) -# Add a function redirection to $PSI_REDIRS_H. -psi_add_redir() { - PSI_REDIRS="$PSI_REDIRS - {\"$1\", (psi_func_ptr) $2}," -} - -# psi_add_decl(decl, options) -# Add a pre-defined decl to $PSI_VA_DECLS_H/$PSI_DECLS_H. -psi_add_decl() { - PSI_DECLS="$PSI_DECLS - $1, {0}," -} - -dnl PSI_DECL_TYPE(type functor_name, args) -dnl Adds a pre-defined functor decl to $PSI_FN_DECLS_H. -AC_DEFUN(PSI_DECL_TYPE, [ - PSI_DECL_ARGS($1, $2, functor) - psi_add_decl "$psi_decl_args" -]) -dnl PSI_REDIR(name, custom symbol) -dnl Create a function redirection to an optional custom symbol. -AC_DEFUN(PSI_REDIR, [ - psi_add_redir $1 ifelse([$2],[],[$1],[$2]) -]) - -dnl PSI_DECL_ARGS(decl func, decl args, options) -dnl INTERNAL: build psi_decl_args -AC_DEFUN(PSI_DECL_ARGS, [ - psi_decl_args= - PSI_DECL_ARG([$1], [$3]) - m4_case([$2], - [(void)], [], - [()], [], - [], [], - [m4_map_args_sep( - [PSI_DECL_ARG(m4_normalize(], - [), [0])], [], m4_bregexp([$2], [(\(.*\))], [\1]))]) -]) - -dnl PSI_DECL_ARG(decl arg, options) -dnl INTERNAL: build psi_decl_args -AC_DEFUN(PSI_DECL_ARG, [ - m4_define([member_name], PSI_VAR_NAME([$1])) - m4_define([member_type], PSI_VAR_TYPE([$1])) - - PSI_TYPE_INDIRECTION([$1],, pl, as) - if test -n "$psi_decl_args"; then - psi_decl_args="$psi_decl_args, " - fi - psi_decl_args="[$psi_decl_args{]ifelse([$2],,DECL_KIND_STD,[ifelse([$2],0,0,AS_TR_CPP([DECL_KIND_$2]))])[, ]PSI_TYPE_PAIR(member_type)[, \"]member_name[\",] $pl, $as[}]" -]) - -dnl PSI_DECL(type func, args, flags, libs) -dnl Check for a function or macro declaration and a possible asm redirection. -dnl Adds a pre-defined (vararg) decl to $PSI_VA_DECLS_H/$PSI_DECLS_H. -dnl Calls PSI_MACRO if PSI_FUNC fails. -AC_DEFUN(PSI_DECL, [ - PSI_DECL_ARGS($1, $2, $3) - - psi_symbol="PSI_VAR_NAME($1)" - AC_CACHE_CHECK(for PSI_VAR_NAME($1), [psi_cv_fn_]PSI_VAR_NAME($1), [ - psi_decl_check= - psi_symbol_redirect= - for lib in "" $4; do - decl_save_LIBS=$LIBS - LIBS=$lib - AC_TRY_LINK(PSI_INCLUDES, [ - void (*fn)(long, long, long) = (void (*)(long,long,long)) $psi_symbol; - fn(1,2,3); - ], [ - psi_symbol_redirect=`nm -g conftest$ac_exeext | $AWK -F ' *|@' '/^@<:@@<:@:space:@:>@@:>@+U '$psi_cv_libc_main'/ {next} /^@<:@@<:@:space:@:>@@:>@+U / {print$[]3; exit}'` - ]) - LIBS=$decl_save_LIBS - - if test -n "$psi_symbol_redirect"; then - if test -n "$lib"; then - psi_decl_check="$psi_symbol_redirect in $lib" - else - psi_decl_check="$psi_symbol_redirect" - fi - break - fi - done - [psi_cv_fn_]PSI_VAR_NAME($1)=$psi_decl_check - ]) - - psi_symbol_redirect=`AS_ECHO("$[psi_cv_fn_]PSI_VAR_NAME($1)") | $AWK -F " in " '{print [$]1}'` - psi_symbol_libflag=`AS_ECHO("$[psi_cv_fn_]PSI_VAR_NAME($1)") | $AWK -F " in " '{print [$]2}'` - - if test -n "$psi_symbol_libflag"; then - if ! expr "X$LIBS" : "X.*\b$psi_symbol_libflag\b" >/dev/null; then - LIBS="$psi_symbol_libflag $LIBS" - fi - fi - - case "$psi_symbol_redirect" in - "$psi_symbol"|"_$psi_symbol") - case "$PSI_EXTRA_REDIRS-$3" in - "true-") - PSI_MACRO($1, $2, [ - psi_add_decl "$psi_decl_args" - ]) - ;; - *) - if test -n "$psi_symbol_libflag" - then - PSI_REDIR($psi_symbol) - fi - psi_add_decl "$psi_decl_args" - ;; - esac - ;; - "") - ifelse([$3], vararg, [ - AC_MSG_WARN(varargs macro support is not implemented) - ],[ - PSI_MACRO($1, $2, [ - psi_add_decl "$psi_decl_args" - ]) - ]) - ;; - *) - PSI_REDIR($psi_symbol) - psi_add_decl "$psi_decl_args" - ;; - esac -]) diff --git a/m4/psi/psi_macro.m4 b/m4/psi/psi_macro.m4 deleted file mode 100644 index 9ff8fd9..0000000 --- a/m4/psi/psi_macro.m4 +++ /dev/null @@ -1,70 +0,0 @@ -# psi_add_macro(macro) -# Add a pre-defined macro function to $PSI_MACROS_H. -psi_add_macro() { - PSI_MACROS="$PSI_MACROS -$1" -} - -dnl PSI_MACRO(macro, decl args, action-if-true) -AC_DEFUN(PSI_MACRO, [ - AC_CHECK_DECL(PSI_VAR_NAME($1)$2, [ - macro_type="PSI_VAR_TYPE($1)" - macro_name="PSI_VAR_NAME($1)" - PSI_TYPE_INDIRECTION([$1],, macro_pointer_level, macro_array_size) - if test "$macro_array_size" -gt 0; then - macro_array="@<:@$macro_array_size@:>@" - macro_return="$macro_type*" - else - macro_array="" - macro_return="$macro_type" - fi - m4_case([$2], - [(void)], [ - macro_decl="(void)" - macro_call="()" - macro_action=call - ], - [()], [ - macro_decl="()" - macro_call="()" - macro_action=call - ], - [], [ - macro_decl="()" - macro_call="" - macro_action=get - ], - [ - macro_decl="$2" - macro_call="(m4_map_args_sep([PSI_VAR_NAME(], [)], [, ], m4_bregexp($2, [(\(.*\))], [\1])))" - macro_action=call - ] - ) - ifelse(PSI_VAR_TYPE($1), [void], [ - macro_body="$macro_name$macro_call;" - ], [ - macro_body="return $macro_name$macro_call;" - ]) - $3 - psi_add_macro "$macro_return _psi_${macro_action}_$macro_name$macro_decl { $macro_body }" - PSI_REDIR($macro_name, _psi_${macro_action}_$macro_name) - ], [], PSI_INCLUDES) -]) - -dnl PSI_EXTVAR(type var) -AC_DEFUN(PSI_EXTVAR, [ - PSI_MACRO($1, [], [ - dnl just a getter - PSI_DECL_ARGS($1) - psi_add_decl "$psi_decl_args" - dnl explicit getter - PSI_REDIR([${macro_name}_get], [_psi_get_$macro_name]) - PSI_DECL_ARGS(PSI_VAR_TYPE_RETURN([$1]) PSI_VAR_NAME([$1])_get) - psi_add_decl "$psi_decl_args" - dnl setter - psi_add_macro "void _psi_set_${macro_name}($macro_type value$macro_array) { memcpy(&$macro_name, &value, sizeof($macro_type$macro_array)); }" - PSI_REDIR([${macro_name}_set], [_psi_set_${macro_name}]) - PSI_DECL_ARGS([void ]PSI_VAR_NAME([$1])[_set], [($1)]) - psi_add_decl "$psi_decl_args" - ]) -]) diff --git a/php_psi_posix.h.in b/php_psi_posix.h.in index 47bfc09..bc2d356 100644 --- a/php_psi_posix.h.in +++ b/php_psi_posix.h.in @@ -38,32 +38,6 @@ static struct psi_std_type { }; #endif -#ifdef PSI_PREDEF_TYPES -static struct psi_predef_type { - token_t type_tag; - const char *type_name; - const char *alias; -} psi_predef_types[] = { -@PSI_TYPES@ - {0} -}; -#endif - -#ifdef PSI_PREDEF_COMPOSITES -static struct psi_predef_composite { - token_t type_tag; - const char *type_name; - const char *var_name; - size_t offset; - size_t size; - size_t pointer_level; - size_t array_size; -} psi_predef_composites[] = { -@PSI_COMPOSITES@ - {0} -}; -#endif - #ifdef PSI_PREDEF_CONSTS static struct psi_predef_const { token_t type_tag; @@ -76,27 +50,7 @@ static struct psi_predef_const { }; #endif -#ifdef PSI_PREDEF_DECLS -static struct psi_predef_decl { - enum { - DECL_KIND_STD, - DECL_KIND_VARARG, - DECL_KIND_FUNCTOR - } kind; - token_t type_tag; - const char *type_name; - const char *var_name; - size_t pointer_level; - size_t array_size; -} psi_predef_decls[] = { -@PSI_DECLS@ - {0} -}; -#endif - #ifdef PSI_FUNC_REDIRS -@PSI_MACROS@ - typedef void (*psi_func_ptr)(); static struct psi_func_redir { const char *name; @@ -109,7 +63,6 @@ static struct psi_func_redir { {"mknod", (psi_func_ptr) mknod}, {"mknodat", (psi_func_ptr) mknodat}, {"stat", (psi_func_ptr) stat}, -@PSI_REDIRS@ {0} }; #endif -- 2.30.2