diff options
-rw-r--r-- | MANIFEST | 10 | ||||
-rw-r--r-- | mcon/U/d_datastart_symbol.U | 64 | ||||
-rw-r--r-- | mcon/U/d_dliterphdr.U | 44 | ||||
-rw-r--r-- | mcon/U/d_getcontext.U | 38 | ||||
-rw-r--r-- | mcon/U/d_sendmsg.U | 70 |
5 files changed, 223 insertions, 3 deletions
@@ -189,8 +189,6 @@ mcon/U/d_chsize.U Size of a char mcon/U/d_ckeypad.U Do we have the curses keypad()? mcon/U/d_closedir.U Do we have closedir()? mcon/U/d_closefrom.U Do we have closefrom()? -mcon/U/d_uctx_mctx.U Do we have a uc_mcontext field in struct ucontext? -mcon/U/d_uctx_mctx_gregs.U Do we have uc_mcontext.gregs[] in struct ucontext? mcon/U/d_const.U Can cc grok the const keyword? mcon/U/d_crypt.U Does crypt() exist? mcon/U/d_csh.U csh path @@ -204,6 +202,7 @@ mcon/U/d_difftime.U Do we have difftime()? mcon/U/d_dirent_d_type.U Does struct dirent has a member d_type? mcon/U/d_dladdr.U Do we have dladdr()? mcon/U/d_dlerror.U Do we have dlerror()? +mcon/U/d_dliterphdr.U Do we have dl_iterate_phdr()? mcon/U/d_dlopen.U Do we have dlopen()? mcon/U/d_dosuid.U Do they want setuid emulation? mcon/U/d_drem.U Do we have drem()? @@ -212,6 +211,7 @@ mcon/U/d_end_symbol.U Whether linker defines the "end" symbol mcon/U/d_eofpipe.U Will EOF be seen on closed pipes? mcon/U/d_epoll.U Can we use epoll_xxx() routines? mcon/U/d_etext_symbol.U Whether linker defines the "etext" symbol +mcon/U/d_datastart_symbol.U Whether linker defines the "__data_start" symbol mcon/U/d_euc2jis.U Do we have euc2jis()? mcon/U/d_fast_assert.U Can we use fast assertions? mcon/U/d_fchmod.U Do we have fchmod()? @@ -229,6 +229,7 @@ mcon/U/d_ftime.U Do we have ftime()? mcon/U/d_ftrncate.U Do we have ftruncate()? mcon/U/d_gconvert.U Do we have gconvert() or gcvt()? mcon/U/d_getaddrinfo.U Do we have etaddrinfo()? +mcon/U/d_getcontext.U Do we have getcontext()? mcon/U/d_geteuid.U Do we have geteuid()? mcon/U/d_getgrps.U Do we have getgroups()? mcon/U/d_gethbynm.U Do we have gethostbyname()? @@ -354,6 +355,7 @@ mcon/U/d_semctl.U Do we have d_semctl()? mcon/U/d_semget.U Do we have semget()? mcon/U/d_semop.U Do we have semop()? mcon/U/d_sendfile.U Do we have sendfile()? +mcon/U/d_sendmsg.U Do we have sendmsg()? mcon/U/d_setegid.U Do we have setegid()? mcon/U/d_seteuid.U Do we have seteuid()? mcon/U/d_setgrps.U Do we have setgroups()? @@ -429,6 +431,8 @@ mcon/U/d_tminsys.U Is struct tm in <sys/time.h>? mcon/U/d_truncate.U Do we have truncate()? mcon/U/d_tzmin.U Do we use tz_minuteswest? mcon/U/d_tzname.U Do we have tzname[]? +mcon/U/d_uctx_mctx.U Do we have a uc_mcontext field in struct ucontext? +mcon/U/d_uctx_mctx_gregs.U Do we have uc_mcontext.gregs[] in struct ucontext? mcon/U/d_ulimit.U Do we have ulimit()? mcon/U/d_umask.U Do we have umask()? mcon/U/d_usendir.U Use our own ndir routines? @@ -501,7 +505,6 @@ mcon/U/i_pthread.U Shall we include <pthread.h>? mcon/U/i_pwd.U Shall we include <pwd.h>? mcon/U/i_regex.U Shall we include <regex.h>? mcon/U/i_sched.U Shall we include <sched.h>? -mcon/U/i_ucontext.U Shall we include <ucontext.h> mcon/U/i_sfio.U Shall we include <sfio.h>? mcon/U/i_stddef.U Shall we include <stddef.h>? mcon/U/i_stdlib.U Shall we include <stdlib.h>? @@ -532,6 +535,7 @@ mcon/U/i_sysvfs.U Shall we include <sys/vfs.h>? mcon/U/i_syswait.U Is there a <sys/wait.h>? mcon/U/i_termio.U Include <termio.h> or <sgtty.h>? mcon/U/i_time.U Which time.h should we include? +mcon/U/i_ucontext.U Shall we include <ucontext.h> mcon/U/i_unistd.U Include <unistd.h>? mcon/U/i_utime.U Include <utime.h>? mcon/U/i_values.U Shall we include <values.h> diff --git a/mcon/U/d_datastart_symbol.U b/mcon/U/d_datastart_symbol.U new file mode 100644 index 0000000..e612d2c --- /dev/null +++ b/mcon/U/d_datastart_symbol.U @@ -0,0 +1,64 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 2011, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_datastart_symbol d_weak_datastart_symbol: Trylink cat +?MAKE: -pick add $@ %< +?S:d_datastart_symbol: +?S: This variable conditionally defines HAS_DATA_START_SYMBOL if the +?S: linker-defined symbol "__data_start" is available to compute the start +?S: address of the program's data segment. +?S:. +?S:d_weak_datastart_symbol: +?S: This variable conditionally defines HAS_WEAK_DATA_START_SYMBOL if the +?S: linker-defined symbol "data_start" is weakly defined to compute the start +?S: address of the program's data segment. +?S:. +?C:HAS_DATA_START_SYMBOL: +?C: This symbol, if defined, indicates that the C program can declare +?C: extern const int __data_start; +?C: and then use &__data_start to know the start of the data segment. +?C:. +?C:HAS_WEAK_DATA_START_SYMBOL: +?C: This symbol, if defined, indicates that the C program can declare +?C: #pragma weak data_start +?C: extern const int data_start; +?C: and then use &data_start to know the start of the data segment. +?C:. +?H:#$d_datastart_symbol HAS_DATA_START_SYMBOL /**/ +?H:#$d_weak_datastart_symbol HAS_WEAK_DATA_START_SYMBOL /**/ +?H:. +?LINT:set d_datastart_symbol d_weak_datastart_symbol +: see if the __data_start symbol exists +$cat >try.c <<EOC +int main(void) +{ + extern int __data_start; + return (int) &__data_start >> 12; +} +EOC +cyn="whether your linker defines the __data_start symbol" +set d_datastart_symbol +eval $trylink + +@if d_weak_datastart_symbol || HAS_WEAK_DATA_START_SYMBOL +: see if the weak data_start symbol exists +$cat >try.c <<EOC +int main(void) +{ +#pragma weak data_start + extern int data_start; + return (int) &data_start >> 12; +} +EOC +cyn="whether your linker defines the weak data_start symbol" +set d_weak_datastart_symbol +eval $trylink + +@end diff --git a/mcon/U/d_dliterphdr.U b/mcon/U/d_dliterphdr.U new file mode 100644 index 0000000..73b24b7 --- /dev/null +++ b/mcon/U/d_dliterphdr.U @@ -0,0 +1,44 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 2012, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_dliterphdr: Trylink cat +?MAKE: -pick add $@ %< +?S:d_dliterphdr: +?S: This variable conditionally defines HAS_DL_ITERATE_PHDR when +?S: dl_iterate_phdr() is available to walk through the list of shared +?S: objects. +?S:. +?C:HAS_DL_ITERATE_PHDR: +?C: This symbol, if defined, indicates that the dl_iterate_phdr() function is +?C: available to walk through the list of shared objects. One needs to +?C: define _GNU_SOURCE before including <link.h> to get the proper signature. +?C:. +?H:#$d_dliterphdr HAS_DL_ITERATE_PHDR /**/ +?H:. +?LINT:set d_dliterphdr +: see if dl_iterate_phdr exists +$cat >try.c <<EOC +#define _GNU_SOURCE +#include <link.h> +int cb(struct dl_phdr_info *info, size_t size, void *data) +{ + return NULL == info && NULL == data && size != 0 ? 0 : 1; +} +int main(void) +{ + int ret; + ret = dl_iterate_phdr(cb, NULL); + return ret ? 0 : 1; +} +EOC +cyn=dl_iterate_phdr +set d_dliterphdr +eval $trylink + diff --git a/mcon/U/d_getcontext.U b/mcon/U/d_getcontext.U new file mode 100644 index 0000000..f32ae6e --- /dev/null +++ b/mcon/U/d_getcontext.U @@ -0,0 +1,38 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 2012, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_getcontext: Trylink cat +?MAKE: -pick add $@ %< +?S:d_getcontext: +?S: This variable conditionally defines HAS_GETCONTEXT if getcontext() is +?S: available to save a process context. +?S:. +?C:HAS_GETCONTEXT: +?C: This symbol, if defined, indicates that the getcontext() function is +?C: available to save a process context. +?C:. +?H:#$d_getcontext HAS_GETCONTEXT /**/ +?H:. +?LINT:set d_getcontext +: see if getcontext exists +$cat >try.c <<EOC +#include <ucontext.h> +int main(void) +{ + int ret; + ucontext_t u; + ret = getcontext(&u); + return ret ? 0 : 1; +} +EOC +cyn=getcontext +set d_getcontext +eval $trylink + diff --git a/mcon/U/d_sendmsg.U b/mcon/U/d_sendmsg.U new file mode 100644 index 0000000..8dd9ec7 --- /dev/null +++ b/mcon/U/d_sendmsg.U @@ -0,0 +1,70 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 2006, Christian Biere +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_sendmsg: Trylink cat i_systypes i_sysselct i_syssock \ + i_winsock2 i_mswsock d_windows +?MAKE: -pick add $@ %< +?S:d_sendmsg: +?S: This variable conditionally defines the HAS_SENDMSG symbol, +?S: which indicates to the C program that the sendmsg() function is +?S: available. +?S:. +?C:HAS_SENDMSG: +?C: This symbol, if defined, indicates that the sendmsg() function +?C: is available. +?C:. +?H:#$d_sendmsg HAS_SENDMSG /**/ +?H:. +?LINT:set d_sendmsg +: check for sendmsg function +$cat >try.c <<EOC +#$i_systypes I_SYS_TYPES +#$i_sysselct I_SYS_SELECT +#$i_syssock I_SYS_SOCKET +#$i_winsock2 I_WINSOCK2 +#$i_mswsock I_MSWSOCK +#$d_windows WINDOWS_SYSTEM +#ifdef I_SYS_TYPES +#include <sys/types.h> +#endif +#ifdef I_SYS_SOCKET +#include <sys/socket.h> +#endif +#ifdef WINDOWS_SYSTEM +#define WINVER 0x0501 +#endif +#ifdef I_WINSOCK2 +#include <Winsock2.h> +#endif +#ifdef I_MSWSOCK +#include <Mswsock.h> +#endif +int main(void) +{ + static struct msghdr msg; + int ret, fd, flags; + + fd = 1; + flags = 1; + msg.msg_name = (void *) 0; + msg.msg_namelen |= 1; + msg.msg_iov = (void *) 0; + msg.msg_iovlen |= 1; + /* msg.msg_flags is intentionally excluded, see other unit */ + msg.msg_control = (void *) 0; + msg.msg_controllen |= 1; + ret = sendmsg(fd, &msg, flags); + return ret ? 0 : 1; +} +EOC +cyn='sendmsg' +set d_sendmsg +eval $trylink + |