mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Added a wait_select() function which works very much like the
bsdsocket.library/WaitSelect() function. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15091 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
#
|
||||
# $Id: GNUmakefile.68k,v 1.80 2006-01-29 09:16:59 obarthel Exp $
|
||||
# $Id: GNUmakefile.68k,v 1.81 2006-04-05 07:53:23 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
#
|
||||
@ -772,7 +772,9 @@ NET_LIB = \
|
||||
socket_recv.o \
|
||||
socket_recvfrom.o \
|
||||
socket_recvmsg.o \
|
||||
socket_select_signal.o \
|
||||
socket_select.o \
|
||||
socket_wait_select.o \
|
||||
socket_send.o \
|
||||
socket_sendmsg.o \
|
||||
socket_sendto.o \
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# $Id: GNUmakefile.os4,v 1.94 2006-04-05 06:43:56 obarthel Exp $
|
||||
# $Id: GNUmakefile.os4,v 1.95 2006-04-05 07:53:24 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
#
|
||||
@ -784,7 +784,9 @@ NET_LIB = \
|
||||
socket_recv.o \
|
||||
socket_recvfrom.o \
|
||||
socket_recvmsg.o \
|
||||
socket_select_signal.o \
|
||||
socket_select.o \
|
||||
socket_wait_select.o \
|
||||
socket_send.o \
|
||||
socket_sendmsg.o \
|
||||
socket_sendto.o \
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
- Added a wait_select() function which works very much like the
|
||||
bsdsocket.library/WaitSelect() function.
|
||||
|
||||
- Added <sys/time.h> include to <sys/socket.h> due to latest "TimeVal" change
|
||||
in the OS4 SDK. Otherwise "struct timeval" will not be defined at the time
|
||||
the <net/if.h> of the netincludes will be included by <proto/bsdsocket.h>.
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: select.h,v 1.6 2006-01-08 12:06:14 obarthel Exp $
|
||||
* $Id: select.h,v 1.7 2006-04-05 07:53:30 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -108,6 +108,22 @@ typedef struct fd_set
|
||||
|
||||
extern int select(int nfds, fd_set *readfds,fd_set *writefds, fd_set *errorfds,struct timeval *timeout);
|
||||
|
||||
/* This is a special select() function which takes an extra Amiga signal
|
||||
bit mask pointer parameter. This function works like select(), but it will
|
||||
also return if any of the signals indicated by the 'signal_mask' parameter
|
||||
are set. When this function returns, the variable pointed to by the
|
||||
'signal_mask' parameter will have all the bits set which were set at the
|
||||
time the function was called and for which signals arrived while the
|
||||
function was still running. When this function returns, any signals
|
||||
received while it was running for which bits were set in the 'signal_mask'
|
||||
parameter value will be cleared with the exception of SIGBREAKF_CTRL_C.
|
||||
In brief, wait_select() works exactly like the bsdsocket.library/WaitSelect()
|
||||
function. */
|
||||
|
||||
#ifndef __NO_WAIT_SELECT
|
||||
extern int wait_select(int num_fds,fd_set *read_fds,fd_set *write_fds,fd_set *except_fds,struct timeval *timeout,ULONG * signal_mask);
|
||||
#endif /* __NO_WAIT_SELECT */
|
||||
|
||||
#endif /* __NO_NET_API */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#
|
||||
# $Id: smakefile,v 1.59 2006-01-02 13:23:33 obarthel Exp $
|
||||
# $Id: smakefile,v 1.60 2006-04-05 07:53:24 obarthel Exp $
|
||||
#
|
||||
# :ts=8
|
||||
#
|
||||
@ -358,7 +358,9 @@ SOCKET_OBJ = \
|
||||
socket_recv.o \
|
||||
socket_recvfrom.o \
|
||||
socket_recvmsg.o \
|
||||
socket_select_signal.o \
|
||||
socket_select.o \
|
||||
socket_wait_select.o \
|
||||
socket_send.o \
|
||||
socket_sendmsg.o \
|
||||
socket_sendto.o \
|
||||
@ -801,7 +803,7 @@ dirent_opendir.o : dirent_opendir.c stdlib_memory.h
|
||||
|
||||
fcntl_open.o : fcntl_open.c stdlib_memory.h
|
||||
|
||||
socket_select.o : socket_select.c stdlib_memory.h
|
||||
socket_select_signal.o : socket_select_signal.c stdlib_memory.h
|
||||
|
||||
stdio_fclose.o : stdio_fclose.c stdlib_memory.h
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: socket_headers.h,v 1.13 2006-01-08 12:04:24 obarthel Exp $
|
||||
* $Id: socket_headers.h,v 1.14 2006-04-05 07:53:24 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -127,6 +127,7 @@ extern int __socket_hook_entry(struct fd * fd,struct file_action_message * fam);
|
||||
extern int __get_h_errno(void);
|
||||
extern void __set_h_errno(int new_h_errno);
|
||||
extern BOOL __obtain_daemon_message(VOID);
|
||||
extern int __select(int num_fds,fd_set *read_fds,fd_set *write_fds,fd_set *except_fds,struct timeval *timeout,ULONG * signal_mask_ptr);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1141
library/socket_select_signal.c
Normal file
1141
library/socket_select_signal.c
Normal file
File diff suppressed because it is too large
Load Diff
56
library/socket_wait_select.c
Normal file
56
library/socket_wait_select.c
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* $Id: socket_wait_select.c,v 1.1 2006-04-05 07:53:24 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||
* Copyright (c) 2002-2006 by Olaf Barthel <olsen (at) sourcery.han.de>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Neither the name of Olaf Barthel nor the names of contributors
|
||||
* may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(SOCKET_SUPPORT)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#ifndef _SOCKET_HEADERS_H
|
||||
#include "socket_headers.h"
|
||||
#endif /* _SOCKET_HEADERS_H */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
int
|
||||
wait_select(int num_fds,fd_set *read_fds,fd_set *write_fds,fd_set *except_fds,struct timeval *timeout,ULONG * signal_mask)
|
||||
{
|
||||
int result;
|
||||
|
||||
result = __select(num_fds,read_fds,write_fds,except_fds,timeout,signal_mask);
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* SOCKET_SUPPORT */
|
||||
Reference in New Issue
Block a user