Clean up some syscall logic that has changed due to revised netdb configuration
This commit is contained in:
parent
a4a29f4ead
commit
ed004be6d0
@ -402,33 +402,37 @@
|
||||
# define SYS_putenv (__SYS_environ+2)
|
||||
# define SYS_setenv (__SYS_environ+3)
|
||||
# define SYS_unsetenv (__SYS_environ+4)
|
||||
# define __SYS_network (__SYS_environ+5)
|
||||
# define __SYS_netdb (__SYS_environ+5)
|
||||
#else
|
||||
# define __SYS_network __SYS_environ
|
||||
# define __SYS_netdb __SYS_environ
|
||||
#endif
|
||||
|
||||
/* The following are defined if networking is supported */
|
||||
/* The following are defined if netdb is supported */
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
# define SYS_sethostname (__SYS_network+0)
|
||||
#ifdef CONFIG_LIBC_NETDB
|
||||
# define SYS_sethostname (__SYS_netdb+0)
|
||||
# define __SYS_network (__SYS_netdb+1)
|
||||
#else
|
||||
# define __SYS_network __SYS_netdb
|
||||
#endif
|
||||
|
||||
/* The following are defined only if networking AND sockets are supported */
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
# define SYS_accept (__SYS_network+1)
|
||||
# define SYS_bind (__SYS_network+2)
|
||||
# define SYS_connect (__SYS_network+3)
|
||||
# define SYS_getsockopt (__SYS_network+4)
|
||||
# define SYS_listen (__SYS_network+5)
|
||||
# define SYS_recv (__SYS_network+6)
|
||||
# define SYS_recvfrom (__SYS_network+7)
|
||||
# define SYS_send (__SYS_network+8)
|
||||
# define SYS_sendto (__SYS_network+9)
|
||||
# define SYS_setsockopt (__SYS_network+10)
|
||||
# define SYS_socket (__SYS_network+11)
|
||||
# define SYS_nnetsocket (__SYS_network+12)
|
||||
# define SYS_accept (__SYS_network+0)
|
||||
# define SYS_bind (__SYS_network+1)
|
||||
# define SYS_connect (__SYS_network+2)
|
||||
# define SYS_getsockopt (__SYS_network+3)
|
||||
# define SYS_listen (__SYS_network+4)
|
||||
# define SYS_recv (__SYS_network+5)
|
||||
# define SYS_recvfrom (__SYS_network+6)
|
||||
# define SYS_send (__SYS_network+7)
|
||||
# define SYS_sendto (__SYS_network+8)
|
||||
# define SYS_setsockopt (__SYS_network+9)
|
||||
# define SYS_socket (__SYS_network+10)
|
||||
# define SYS_nnetsocket (__SYS_network+11)
|
||||
#else
|
||||
# define SYS_nnetsocket (__SYS_network+1)
|
||||
# define SYS_nnetsocket __SYS_network
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
@ -45,6 +45,7 @@
|
||||
"ftell","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","long","FAR FILE *"
|
||||
"fwrite","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && CONFIG_NFILE_STREAMS > 0","size_t","FAR const void *","size_t","size_t","FAR FILE *"
|
||||
"getcwd","unistd.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_ENVIRON)","FAR char","FAR char *","size_t"
|
||||
"gethostname","unistd.h","defined(CONFIG_LIBC_NETDB)","int","FAR char*","size_t"
|
||||
"getopt","unistd.h","","int","int","FAR char *const[]","FAR const char *"
|
||||
"getoptargp","unistd.h","","FAR char *"
|
||||
"getoptindp","unistd.h","","int"
|
||||
|
Can't render this file because it has a wrong number of fields in line 2.
|
@ -97,7 +97,7 @@ int uname(FAR struct utsname *name)
|
||||
|
||||
strncpy(name->sysname, "NuttX", SYS_NAMELEN);
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
#ifdef CONFIG_LIBC_NETDB
|
||||
/* Get the hostname */
|
||||
|
||||
if (-1 == gethostname(name->nodename, HOST_NAME_MAX))
|
||||
|
@ -121,7 +121,7 @@
|
||||
"sendto","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","ssize_t","int","FAR const void*","size_t","int","FAR const struct sockaddr*","socklen_t"
|
||||
"set_errno","errno.h","","void","int"
|
||||
"setenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char*","FAR const char*","int"
|
||||
"sethostname","unistd.h","defined(CONFIG_NET)","int","FAR const char*","size_t"
|
||||
"sethostname","unistd.h","defined(CONFIG_LIBC_NETDB)","int","FAR const char*","size_t"
|
||||
"setsockopt","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","int","int","int","int","FAR const void*","socklen_t"
|
||||
"shmat", "sys/shm.h", "defined(CONFIG_MM_SHM)", "FAR void *", "int", "FAR const void *", "int"
|
||||
"shmctl", "sys/shm.h", "defined(CONFIG_MM_SHM)", "int", "int", "int", "FAR struct shmid_ds *"
|
||||
|
Can't render this file because it has a wrong number of fields in line 2.
|
@ -299,14 +299,15 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
|
||||
SYSCALL_LOOKUP(unsetenv, 1, STUB_unsetenv)
|
||||
#endif
|
||||
|
||||
/* The following are defined only if networking is supported */
|
||||
/* The following are defined only if netdb is supported */
|
||||
|
||||
#ifdef CONFIG_NET
|
||||
#ifdef CONFIG_LIBC_NETDB
|
||||
SYSCALL_LOOKUP(sethostname, 2, STUB_sethostname)
|
||||
#endif
|
||||
|
||||
/* The following are defined only if networking AND sockets are supported */
|
||||
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0
|
||||
#if CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)
|
||||
SYSCALL_LOOKUP(accept, 3, STUB_accept)
|
||||
SYSCALL_LOOKUP(bind, 3, STUB_bind)
|
||||
SYSCALL_LOOKUP(connect, 3, STUB_connect)
|
||||
|
@ -316,7 +316,7 @@ uintptr_t STUB_setenv(int nbr, uintptr_t parm1, uintptr_t parm2,
|
||||
uintptr_t parm3);
|
||||
uintptr_t STUB_unsetenv(int nbr, uintptr_t parm1);
|
||||
|
||||
/* The following are defined only if networking is supported */
|
||||
/* The following are defined only if netb is supported */
|
||||
|
||||
uintptr_t STUB_sethostname(int nbr, uintptr_t parm1, uintptr_t parm2);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user