w.i.p - add stubs for select/pselect.

This commit is contained in:
Kalamatee 2023-04-25 13:11:46 +01:00 committed by deadwood
parent 71b1ccd637
commit ff86935809
5 changed files with 86 additions and 4 deletions

View File

@ -8,10 +8,10 @@
Desc: POSIX.1-2008 header file sys/select.h
*/
#include <aros/system.h>
#include <aros/cpu.h>
#include <aros/types/timeval_s.h> /* get struct timeval */
#include <aros/types/time_t.h>
#include <aros/types/suseconds_t.h>
#include <aros/types/sigset_t.h>

View File

@ -142,6 +142,7 @@ POSIXC := \
popen \
posix_memalign \
printf \
pselect \
putchar \
putenv \
puts \
@ -165,6 +166,7 @@ POSIXC := \
scanf \
seed48 \
seekdir \
select \
setbuf \
setegid \
setenv \

View File

@ -1,5 +1,5 @@
##begin config
version 0.10
version 0.11
basename PosixC
libbasetypeextern struct PosixCBase
libbasetype struct PosixCIntBase
@ -27,6 +27,7 @@ options pertaskbase,rellinklib
#include <sys/utsname.h>
#include <termios.h>
#include <utime.h>
#include <sys/select.h>
#if !defined(__off64_t_defined)
#define off64_t UQUAD
@ -719,8 +720,8 @@ int setrlimit(int resource, const struct rlimit *rlp)
#int FD_ISSET(int, fd_set *)
#void FD_SET(int, fd_set *)
#void FD_ZERO(fd_set *)
#int pselect(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, const struct timespec *restrict, const sigset_t *restrict)
#int select(int, fd_set *restrict, fd_set *restrict, fd_set *restrict, struct timeval *restrict)
int pselect(int nfds, fd_set *restrict readfds, fd_set *restrict writefds, fd_set *restrict exceptfds, const struct timespec *restrict timeout, const sigset_t *restrict sigmask)
int select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds, fd_set *restrict exceptfds, struct timeval *restrict timeout)
#
# * sys/sem.h
.skip 3

40
compiler/posixc/pselect.c Normal file
View File

@ -0,0 +1,40 @@
/*
Copyright (C) 2023, The AROS Development Team. All rights reserved.
*/
/*****************************************************************************
NAME */
#include <sys/select.h>
#include <stdarg.h>
int pselect(
/* SYNOPSIS */
int nfds,
fd_set *restrict readfds,
fd_set *restrict writefds,
fd_set *restrict exceptfds,
const struct timespec *restrict timeout,
const sigset_t *restrict sigmask)
/* FUNCTION
INPUTS
RESULT
NOTES
EXAMPLE
BUGS
SEE ALSO
INTERNALS
******************************************************************************/
{
return 0;
}

39
compiler/posixc/select.c Normal file
View File

@ -0,0 +1,39 @@
/*
Copyright (C) 2023, The AROS Development Team. All rights reserved.
*/
/*****************************************************************************
NAME */
#include <sys/select.h>
#include <stdarg.h>
int select(
/* SYNOPSIS */
int nfds,
fd_set *restrict readfds,
fd_set *restrict writefds,
fd_set *restrict exceptfds,
struct timeval *restrict timeout)
/* FUNCTION
INPUTS
RESULT
NOTES
EXAMPLE
BUGS
SEE ALSO
INTERNALS
******************************************************************************/
{
return 0;
}