mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8b360d971 |
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: GNUmakefile.68k,v 1.84 2006-04-05 08:39:45 obarthel Exp $
|
# $Id: GNUmakefile.68k,v 1.80 2006-01-29 09:16:59 obarthel Exp $
|
||||||
#
|
#
|
||||||
# :ts=8
|
# :ts=8
|
||||||
#
|
#
|
||||||
@@ -106,7 +106,6 @@ WARNINGS = \
|
|||||||
INCLUDES = -Iinclude -I. -Inetinclude
|
INCLUDES = -Iinclude -I. -Inetinclude
|
||||||
#OPTIONS = -fno-builtin -fno-common -DDEBUG
|
#OPTIONS = -fno-builtin -fno-common -DDEBUG
|
||||||
OPTIONS = -fno-builtin -fno-common -DNDEBUG
|
OPTIONS = -fno-builtin -fno-common -DNDEBUG
|
||||||
#OPTIONS = -fno-builtin -fno-common -DNDEBUG -D__THREAD_SAFE
|
|
||||||
#OPTIONS = -fno-builtin -fno-common -D__MEM_DEBUG
|
#OPTIONS = -fno-builtin -fno-common -D__MEM_DEBUG
|
||||||
#OPTIONS = -fno-builtin -fno-common -DDEBUG -D__MEM_DEBUG -DNO_INLINE_STDARG
|
#OPTIONS = -fno-builtin -fno-common -DDEBUG -D__MEM_DEBUG -DNO_INLINE_STDARG
|
||||||
OPTIMIZE = -O -fomit-frame-pointer -fstrength-reduce -finline-functions
|
OPTIMIZE = -O -fomit-frame-pointer -fstrength-reduce -finline-functions
|
||||||
@@ -169,7 +168,6 @@ C_LIB = \
|
|||||||
signal_checkabort.o \
|
signal_checkabort.o \
|
||||||
signal_data.o \
|
signal_data.o \
|
||||||
signal_kill.o \
|
signal_kill.o \
|
||||||
signal_mask.o \
|
|
||||||
signal_raise.o \
|
signal_raise.o \
|
||||||
signal_sigaddset.o \
|
signal_sigaddset.o \
|
||||||
signal_sigblock.o \
|
signal_sigblock.o \
|
||||||
@@ -774,9 +772,7 @@ NET_LIB = \
|
|||||||
socket_recv.o \
|
socket_recv.o \
|
||||||
socket_recvfrom.o \
|
socket_recvfrom.o \
|
||||||
socket_recvmsg.o \
|
socket_recvmsg.o \
|
||||||
socket_select_signal.o \
|
|
||||||
socket_select.o \
|
socket_select.o \
|
||||||
socket_wait_select.o \
|
|
||||||
socket_send.o \
|
socket_send.o \
|
||||||
socket_sendmsg.o \
|
socket_sendmsg.o \
|
||||||
socket_sendto.o \
|
socket_sendto.o \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: GNUmakefile.os4,v 1.96 2006-04-05 08:39:45 obarthel Exp $
|
# $Id: GNUmakefile.os4,v 1.93 2006-02-27 11:18:51 obarthel Exp $
|
||||||
#
|
#
|
||||||
# :ts=8
|
# :ts=8
|
||||||
#
|
#
|
||||||
@@ -147,10 +147,10 @@ WARNINGS = \
|
|||||||
# -Wconversion -Wshadow
|
# -Wconversion -Wshadow
|
||||||
|
|
||||||
INCLUDES = -Iinclude -I. -I$(SDK_INCLUDE)
|
INCLUDES = -Iinclude -I. -I$(SDK_INCLUDE)
|
||||||
OPTIONS = -D__THREAD_SAFE -DNDEBUG -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-common -std=gnu99
|
#OPTIONS = -D__THREAD_SAFE -DNDEBUG -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-common -std=gnu99
|
||||||
#OPTIONS = -DNDEBUG -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-common -std=gnu99
|
OPTIONS = -DNDEBUG -DUSE_64_BIT_INTS -D__USE_INLINE__ -Wa,-mregnames -fno-common -std=gnu99
|
||||||
OPTIMIZE = -O3
|
OPTIMIZE = -O3
|
||||||
#DEBUG = -ggdb
|
DEBUG = -ggdb
|
||||||
|
|
||||||
CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDES)
|
CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDES)
|
||||||
|
|
||||||
@@ -159,8 +159,6 @@ CFLAGS = $(WARNINGS) $(OPTIMIZE) $(DEBUG) $(OPTIONS) $(CODE_TYPE) $(INCLUDES)
|
|||||||
# All objects files which make up libc.a
|
# All objects files which make up libc.a
|
||||||
C_LIB = \
|
C_LIB = \
|
||||||
c.lib_rev.o \
|
c.lib_rev.o \
|
||||||
crtbegin.o \
|
|
||||||
crtend.o \
|
|
||||||
ctype_isalnum.o \
|
ctype_isalnum.o \
|
||||||
ctype_isalpha.o \
|
ctype_isalpha.o \
|
||||||
ctype_isascii.o \
|
ctype_isascii.o \
|
||||||
@@ -210,7 +208,6 @@ C_LIB = \
|
|||||||
signal_checkabort.o \
|
signal_checkabort.o \
|
||||||
signal_data.o \
|
signal_data.o \
|
||||||
signal_kill.o \
|
signal_kill.o \
|
||||||
signal_mask.o \
|
|
||||||
signal_raise.o \
|
signal_raise.o \
|
||||||
signal_sigaddset.o \
|
signal_sigaddset.o \
|
||||||
signal_sigblock.o \
|
signal_sigblock.o \
|
||||||
@@ -785,9 +782,7 @@ NET_LIB = \
|
|||||||
socket_recv.o \
|
socket_recv.o \
|
||||||
socket_recvfrom.o \
|
socket_recvfrom.o \
|
||||||
socket_recvmsg.o \
|
socket_recvmsg.o \
|
||||||
socket_select_signal.o \
|
|
||||||
socket_select.o \
|
socket_select.o \
|
||||||
socket_wait_select.o \
|
|
||||||
socket_send.o \
|
socket_send.o \
|
||||||
socket_sendmsg.o \
|
socket_sendmsg.o \
|
||||||
socket_sendto.o \
|
socket_sendto.o \
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 200
|
#define REVISION 199
|
||||||
#define DATE "17.4.2006"
|
#define DATE "6.3.2006"
|
||||||
#define VERS "amiga.lib 1.200"
|
#define VERS "amiga.lib 1.199"
|
||||||
#define VSTRING "amiga.lib 1.200 (17.4.2006)\r\n"
|
#define VSTRING "amiga.lib 1.199 (6.3.2006)\r\n"
|
||||||
#define VERSTAG "\0$VER: amiga.lib 1.200 (17.4.2006)"
|
#define VERSTAG "\0$VER: amiga.lib 1.199 (6.3.2006)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
200
|
199
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: amiga_dotimer.c,v 1.8 2006-04-05 06:43:56 obarthel Exp $
|
* $Id: amiga_dotimer.c,v 1.7 2006-01-08 12:04:22 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -55,23 +55,6 @@
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
/* A quick workaround for the timeval/timerequest->TimeVal/TimeRequest
|
|
||||||
change in the recent OS4 header files. */
|
|
||||||
|
|
||||||
#if defined(__NEW_TIMEVAL_DEFINITION_USED__)
|
|
||||||
|
|
||||||
#define timeval TimeVal
|
|
||||||
#define tv_secs Seconds
|
|
||||||
#define tv_micro Microseconds
|
|
||||||
|
|
||||||
#define timerequest TimeRequest
|
|
||||||
#define tr_node Request
|
|
||||||
#define tr_time Time
|
|
||||||
|
|
||||||
#endif /* __NEW_TIMEVAL_DEFINITION_USED__ */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
DoTimer(struct timeval *tv,LONG unit,LONG command)
|
DoTimer(struct timeval *tv,LONG unit,LONG command)
|
||||||
{
|
{
|
||||||
@@ -84,10 +67,10 @@ DoTimer(struct timeval *tv,LONG unit,LONG command)
|
|||||||
#if defined(__amigaos4__)
|
#if defined(__amigaos4__)
|
||||||
{
|
{
|
||||||
mp = AllocSysObjectTags(ASOT_PORT,
|
mp = AllocSysObjectTags(ASOT_PORT,
|
||||||
ASOPORT_Action, PA_SIGNAL,
|
ASOPORT_Action, PA_SIGNAL,
|
||||||
ASOPORT_AllocSig, FALSE,
|
ASOPORT_AllocSig, FALSE,
|
||||||
ASOPORT_Signal, SIGB_SINGLE,
|
ASOPORT_Signal, SIGB_SINGLE,
|
||||||
ASOPORT_Target, FindTask(NULL),
|
ASOPORT_Target, FindTask(NULL),
|
||||||
TAG_DONE);
|
TAG_DONE);
|
||||||
|
|
||||||
if(mp == NULL)
|
if(mp == NULL)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: amiga_timedelay.c,v 1.4 2006-04-05 06:43:56 obarthel Exp $
|
* $Id: amiga_timedelay.c,v 1.3 2006-01-08 12:04:22 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -39,19 +39,6 @@
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
/* A quick workaround for the timeval/timerequest->TimeVal/TimeRequest
|
|
||||||
change in the recent OS4 header files. */
|
|
||||||
|
|
||||||
#if defined(__NEW_TIMEVAL_DEFINITION_USED__)
|
|
||||||
|
|
||||||
#define timeval TimeVal
|
|
||||||
#define tv_secs Seconds
|
|
||||||
#define tv_micro Microseconds
|
|
||||||
|
|
||||||
#endif /* __NEW_TIMEVAL_DEFINITION_USED__ */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
LONG
|
LONG
|
||||||
TimeDelay(LONG unit,ULONG seconds,ULONG micros)
|
TimeDelay(LONG unit,ULONG seconds,ULONG micros)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 200
|
#define REVISION 199
|
||||||
#define DATE "17.4.2006"
|
#define DATE "6.3.2006"
|
||||||
#define VERS "c.lib 1.200"
|
#define VERS "c.lib 1.199"
|
||||||
#define VSTRING "c.lib 1.200 (17.4.2006)\r\n"
|
#define VSTRING "c.lib 1.199 (6.3.2006)\r\n"
|
||||||
#define VERSTAG "\0$VER: c.lib 1.200 (17.4.2006)"
|
#define VERSTAG "\0$VER: c.lib 1.199 (6.3.2006)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
200
|
199
|
||||||
|
|||||||
@@ -1,29 +1,3 @@
|
|||||||
c.lib 1.200 (17.4.2006)
|
|
||||||
|
|
||||||
- The default break signal mask (SIGBREAKF_CTRL_C) is no longer
|
|
||||||
hard-coded. You can override it at link time with a different
|
|
||||||
variable value for __break_signal_mask. This may have to be
|
|
||||||
augmented by an API for changing the value.
|
|
||||||
|
|
||||||
- Added a waitselect() 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>.
|
|
||||||
|
|
||||||
- The strftime() hook function had the locale and character parameters
|
|
||||||
switched, which made 'setlocale(LC_ALL,""); strftime(..);' unusable.
|
|
||||||
Fixed.
|
|
||||||
|
|
||||||
- fchown() and chown() now accept owner and group ID values of -1, which
|
|
||||||
indicate that the respective information should not be changed.
|
|
||||||
|
|
||||||
- The OS4 library build now includes the crtbegin.o and crtend.o object
|
|
||||||
files in the libc.a library, which solves a problem with the thread-safe
|
|
||||||
shared library support code.
|
|
||||||
|
|
||||||
|
|
||||||
c.lib 1.199 (6.3.2006)
|
c.lib 1.199 (6.3.2006)
|
||||||
|
|
||||||
- In <stdio.h> MAXPATHLEN is now equivalent to PATH_MAX (from <limits.h>),
|
- In <stdio.h> MAXPATHLEN is now equivalent to PATH_MAX (from <limits.h>),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 200
|
#define REVISION 199
|
||||||
#define DATE "17.4.2006"
|
#define DATE "6.3.2006"
|
||||||
#define VERS "debug.lib 1.200"
|
#define VERS "debug.lib 1.199"
|
||||||
#define VSTRING "debug.lib 1.200 (17.4.2006)\r\n"
|
#define VSTRING "debug.lib 1.199 (6.3.2006)\r\n"
|
||||||
#define VERSTAG "\0$VER: debug.lib 1.200 (17.4.2006)"
|
#define VERSTAG "\0$VER: debug.lib 1.199 (6.3.2006)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
200
|
199
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: dos.h,v 1.19 2006-04-05 08:39:46 obarthel Exp $
|
* $Id: dos.h,v 1.18 2006-01-08 12:06:14 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -123,19 +123,6 @@ extern void __check_abort(void);
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
/*
|
|
||||||
* You can override the default break signal mask which is used by
|
|
||||||
* __check_abort() and other functions. This must be done at link
|
|
||||||
* time because the break signal checking is set up very early on
|
|
||||||
* while the program startup code is preparing your code to be run.
|
|
||||||
* In particular, this affects the socket I/O functionality which
|
|
||||||
* configures the break signal only once. The default value of the
|
|
||||||
* __break_signal_mask variable is SIGBREAKF_CTRL_C.
|
|
||||||
*/
|
|
||||||
extern ULONG __break_signal_mask;
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Call this function to set up the environment information for your
|
* Call this function to set up the environment information for your
|
||||||
* program to access its data. This is typically used in Task or Process
|
* program to access its data. This is typically used in Task or Process
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: select.h,v 1.9 2006-04-10 15:08:11 obarthel Exp $
|
* $Id: select.h,v 1.6 2006-01-08 12:06:14 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -108,22 +108,6 @@ typedef struct fd_set
|
|||||||
|
|
||||||
extern int select(int nfds, fd_set *readfds,fd_set *writefds, fd_set *errorfds,struct timeval *timeout);
|
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_WAITSELECT
|
|
||||||
extern int waitselect(int num_fds,fd_set *read_fds,fd_set *write_fds,fd_set *except_fds,struct timeval *timeout,unsigned long * signal_mask);
|
|
||||||
#endif /* __NO_WAITSELECT */
|
|
||||||
|
|
||||||
#endif /* __NO_NET_API */
|
#endif /* __NO_NET_API */
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: socket.h,v 1.6 2006-04-04 21:59:13 damato Exp $
|
* $Id: socket.h,v 1.5 2006-01-08 12:06:14 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -55,10 +55,6 @@
|
|||||||
#include <sys/uio.h>
|
#include <sys/uio.h>
|
||||||
#endif /* _SYS_UIO_H_ */
|
#endif /* _SYS_UIO_H_ */
|
||||||
|
|
||||||
#ifndef _SYS_TIME_H
|
|
||||||
#include <sys/time.h>
|
|
||||||
#endif /* _SYS_TIME_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 200
|
#define REVISION 199
|
||||||
#define DATE "17.4.2006"
|
#define DATE "6.3.2006"
|
||||||
#define VERS "m.lib 1.200"
|
#define VERS "m.lib 1.199"
|
||||||
#define VSTRING "m.lib 1.200 (17.4.2006)\r\n"
|
#define VSTRING "m.lib 1.199 (6.3.2006)\r\n"
|
||||||
#define VERSTAG "\0$VER: m.lib 1.200 (17.4.2006)"
|
#define VERSTAG "\0$VER: m.lib 1.199 (6.3.2006)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
200
|
199
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 200
|
#define REVISION 199
|
||||||
#define DATE "17.4.2006"
|
#define DATE "6.3.2006"
|
||||||
#define VERS "m881.lib 1.200"
|
#define VERS "m881.lib 1.199"
|
||||||
#define VSTRING "m881.lib 1.200 (17.4.2006)\r\n"
|
#define VSTRING "m881.lib 1.199 (6.3.2006)\r\n"
|
||||||
#define VERSTAG "\0$VER: m881.lib 1.200 (17.4.2006)"
|
#define VERSTAG "\0$VER: m881.lib 1.199 (6.3.2006)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
200
|
199
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 200
|
#define REVISION 199
|
||||||
#define DATE "17.4.2006"
|
#define DATE "6.3.2006"
|
||||||
#define VERS "net.lib 1.200"
|
#define VERS "net.lib 1.199"
|
||||||
#define VSTRING "net.lib 1.200 (17.4.2006)\r\n"
|
#define VSTRING "net.lib 1.199 (6.3.2006)\r\n"
|
||||||
#define VERSTAG "\0$VER: net.lib 1.200 (17.4.2006)"
|
#define VERSTAG "\0$VER: net.lib 1.199 (6.3.2006)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
200
|
199
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: sas_profile.c,v 1.7 2006-04-05 06:43:56 obarthel Exp $
|
* $Id: sas_profile.c,v 1.6 2005-04-24 08:46:37 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -52,19 +52,6 @@ extern struct Library * SysBase;
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
/* A quick workaround for the timeval/timerequest->TimeVal/TimeRequest
|
|
||||||
change in the recent OS4 header files. */
|
|
||||||
|
|
||||||
#if defined(__NEW_TIMEVAL_DEFINITION_USED__)
|
|
||||||
|
|
||||||
#define timerequest TimeRequest
|
|
||||||
#define tr_node Request
|
|
||||||
#define tr_time Time
|
|
||||||
|
|
||||||
#endif /* __NEW_TIMEVAL_DEFINITION_USED__ */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
struct SPROFMSG
|
struct SPROFMSG
|
||||||
{
|
{
|
||||||
struct Message message;
|
struct Message message;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: signal_checkabort.c,v 1.4 2006-04-05 08:39:45 obarthel Exp $
|
* $Id: signal_checkabort.c,v 1.3 2006-01-08 12:04:24 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -44,6 +44,6 @@
|
|||||||
void
|
void
|
||||||
__check_abort(void)
|
__check_abort(void)
|
||||||
{
|
{
|
||||||
if(__check_abort_enabled && FLAG_IS_SET(SetSignal(0,__break_signal_mask),__break_signal_mask))
|
if(__check_abort_enabled && FLAG_IS_SET(SetSignal(0,SIGBREAKF_CTRL_C),SIGBREAKF_CTRL_C))
|
||||||
raise(SIGINT);
|
raise(SIGINT);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: signal_kill.c,v 1.8 2006-04-05 08:39:45 obarthel Exp $
|
* $Id: signal_kill.c,v 1.7 2006-01-08 12:04:24 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -80,7 +80,7 @@ kill(pid_t pid, int signal_number)
|
|||||||
SHOWMSG("found the process");
|
SHOWMSG("found the process");
|
||||||
|
|
||||||
if(signal_number == SIGTERM || signal_number == SIGINT)
|
if(signal_number == SIGTERM || signal_number == SIGINT)
|
||||||
Signal((struct Task *)pid,__break_signal_mask);
|
Signal((struct Task *)pid,SIGBREAKF_CTRL_C);
|
||||||
else
|
else
|
||||||
SHOWMSG("but won't shut it down");
|
SHOWMSG("but won't shut it down");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: signal_mask.c,v 1.1 2006-04-05 08:39:45 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.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef _STDLIB_HEADERS_H
|
|
||||||
#include "stdlib_headers.h"
|
|
||||||
#endif /* _STDLIB_HEADERS_H */
|
|
||||||
|
|
||||||
#ifndef _SIGNAL_HEADERS_H
|
|
||||||
#include "signal_headers.h"
|
|
||||||
#endif /* _SIGNAL_HEADERS_H */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
ULONG __break_signal_mask = SIGBREAKF_CTRL_C;
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: lib_user.c,v 1.7 2006-04-05 06:43:56 obarthel Exp $
|
* $Id: lib_user.c,v 1.6 2006-01-08 12:06:14 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -100,7 +100,7 @@ UserLibOpen(struct UserData * ud)
|
|||||||
{
|
{
|
||||||
BOOL result = FALSE;
|
BOOL result = FALSE;
|
||||||
|
|
||||||
/* For the thread safe build, invoke the clib2 shared library
|
/* For the AmigaOS4 build, invoke the clib2 shared library
|
||||||
initialization code. Note that this is not strictly
|
initialization code. Note that this is not strictly
|
||||||
necessary. In fact, you should not need this functionality
|
necessary. In fact, you should not need this functionality
|
||||||
if you stick to use Amiga operating system routines only
|
if you stick to use Amiga operating system routines only
|
||||||
@@ -109,15 +109,15 @@ UserLibOpen(struct UserData * ud)
|
|||||||
Use this feature only if you are porting code to the Amiga
|
Use this feature only if you are porting code to the Amiga
|
||||||
which cannot be easily converted to follow the AmigaOS
|
which cannot be easily converted to follow the AmigaOS
|
||||||
API definitions only. */
|
API definitions only. */
|
||||||
#if defined(__THREAD_SAFE)
|
#if defined(__amigaos4__) && defined(__THREAD_SAFE)
|
||||||
{
|
{
|
||||||
/* Note that the clib2 library initialization is
|
/* Note that the clib2 library initialization is
|
||||||
called exactly once, when the first client
|
called exactly once, when the first client
|
||||||
opens this library. */
|
opens this library. */
|
||||||
if(ud->ud_UseCount == 0 && !__lib_init(ud->ud_SysBase))
|
if(ud->ud_UseCount == 0 && !__lib_init(SysBase))
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
#endif /* __THREAD_SAFE */
|
#endif /* __amigaos4__ && __THREAD_SAFE */
|
||||||
|
|
||||||
/* Remember that one more customer is using this data structure. */
|
/* Remember that one more customer is using this data structure. */
|
||||||
ud->ud_UseCount++;
|
ud->ud_UseCount++;
|
||||||
@@ -140,7 +140,7 @@ UserLibClose(struct UserData * ud)
|
|||||||
/* Remember that one less customer is using this data structure. */
|
/* Remember that one less customer is using this data structure. */
|
||||||
ud->ud_UseCount--;
|
ud->ud_UseCount--;
|
||||||
|
|
||||||
/* For the thread safe build, invoke the clib2 shared library
|
/* For the AmigaOS4 build, invoke the clib2 shared library
|
||||||
cleanup code. Note that this is not strictly
|
cleanup code. Note that this is not strictly
|
||||||
necessary. In fact, you should not need this functionality
|
necessary. In fact, you should not need this functionality
|
||||||
if you stick to use Amiga operating system routines only
|
if you stick to use Amiga operating system routines only
|
||||||
@@ -149,7 +149,7 @@ UserLibClose(struct UserData * ud)
|
|||||||
Use this feature only if you are porting code to the Amiga
|
Use this feature only if you are porting code to the Amiga
|
||||||
which cannot be easily converted to follow the AmigaOS
|
which cannot be easily converted to follow the AmigaOS
|
||||||
API definitions only. */
|
API definitions only. */
|
||||||
#if defined(__THREAD_SAFE)
|
#if defined(__amigaos4__) && defined(__THREAD_SAFE)
|
||||||
{
|
{
|
||||||
/* Note that the clib2 library cleanup code is
|
/* Note that the clib2 library cleanup code is
|
||||||
called exactly once, when the last client
|
called exactly once, when the last client
|
||||||
@@ -157,7 +157,7 @@ UserLibClose(struct UserData * ud)
|
|||||||
if(ud->ud_UseCount == 0)
|
if(ud->ud_UseCount == 0)
|
||||||
__lib_exit();
|
__lib_exit();
|
||||||
}
|
}
|
||||||
#endif /* __THREAD_SAFE */
|
#endif /* __amigaos4__ && __THREAD_SAFE */
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: smakefile,v 1.61 2006-04-05 08:39:45 obarthel Exp $
|
# $Id: smakefile,v 1.59 2006-01-02 13:23:33 obarthel Exp $
|
||||||
#
|
#
|
||||||
# :ts=8
|
# :ts=8
|
||||||
#
|
#
|
||||||
@@ -315,7 +315,6 @@ SIGNAL_OBJ = \
|
|||||||
signal_checkabort.o \
|
signal_checkabort.o \
|
||||||
signal_data.o \
|
signal_data.o \
|
||||||
signal_kill.o \
|
signal_kill.o \
|
||||||
signal_mask.o \
|
|
||||||
signal_raise.o \
|
signal_raise.o \
|
||||||
signal_sigaddset.o \
|
signal_sigaddset.o \
|
||||||
signal_sigblock.o \
|
signal_sigblock.o \
|
||||||
@@ -359,9 +358,7 @@ SOCKET_OBJ = \
|
|||||||
socket_recv.o \
|
socket_recv.o \
|
||||||
socket_recvfrom.o \
|
socket_recvfrom.o \
|
||||||
socket_recvmsg.o \
|
socket_recvmsg.o \
|
||||||
socket_select_signal.o \
|
|
||||||
socket_select.o \
|
socket_select.o \
|
||||||
socket_wait_select.o \
|
|
||||||
socket_send.o \
|
socket_send.o \
|
||||||
socket_sendmsg.o \
|
socket_sendmsg.o \
|
||||||
socket_sendto.o \
|
socket_sendto.o \
|
||||||
@@ -804,7 +801,7 @@ dirent_opendir.o : dirent_opendir.c stdlib_memory.h
|
|||||||
|
|
||||||
fcntl_open.o : fcntl_open.c stdlib_memory.h
|
fcntl_open.o : fcntl_open.c stdlib_memory.h
|
||||||
|
|
||||||
socket_select_signal.o : socket_select_signal.c stdlib_memory.h
|
socket_select.o : socket_select.c stdlib_memory.h
|
||||||
|
|
||||||
stdio_fclose.o : stdio_fclose.c stdlib_memory.h
|
stdio_fclose.o : stdio_fclose.c stdlib_memory.h
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: socket_headers.h,v 1.14 2006-04-05 07:53:24 obarthel Exp $
|
* $Id: socket_headers.h,v 1.13 2006-01-08 12:04:24 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -127,7 +127,6 @@ extern int __socket_hook_entry(struct fd * fd,struct file_action_message * fam);
|
|||||||
extern int __get_h_errno(void);
|
extern int __get_h_errno(void);
|
||||||
extern void __set_h_errno(int new_h_errno);
|
extern void __set_h_errno(int new_h_errno);
|
||||||
extern BOOL __obtain_daemon_message(VOID);
|
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);
|
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: socket_init_exit.c,v 1.26 2006-04-05 08:39:45 obarthel Exp $
|
* $Id: socket_init_exit.c,v 1.25 2006-01-08 12:04:24 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -224,7 +224,7 @@ SOCKET_CONSTRUCTOR(socket_init)
|
|||||||
tags[1].ti_Tag = SBTM_SETVAL(SBTC_BREAKMASK);
|
tags[1].ti_Tag = SBTM_SETVAL(SBTC_BREAKMASK);
|
||||||
|
|
||||||
if(__check_abort_enabled)
|
if(__check_abort_enabled)
|
||||||
tags[1].ti_Data = __break_signal_mask;
|
tags[1].ti_Data = SIGBREAKF_CTRL_C;
|
||||||
else
|
else
|
||||||
tags[1].ti_Data = 0;
|
tags[1].ti_Data = 0;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,56 +0,0 @@
|
|||||||
/*
|
|
||||||
* $Id: socket_wait_select.c,v 1.3 2006-04-10 15:08:10 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
|
|
||||||
waitselect(int num_fds,fd_set *read_fds,fd_set *write_fds,fd_set *except_fds,struct timeval *timeout,unsigned long * signal_mask)
|
|
||||||
{
|
|
||||||
int result;
|
|
||||||
|
|
||||||
result = __select(num_fds,read_fds,write_fds,except_fds,timeout,signal_mask);
|
|
||||||
|
|
||||||
return(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
#endif /* SOCKET_SUPPORT */
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 200
|
#define REVISION 199
|
||||||
#define DATE "17.4.2006"
|
#define DATE "6.3.2006"
|
||||||
#define VERS "stack.lib 1.200"
|
#define VERS "stack.lib 1.199"
|
||||||
#define VSTRING "stack.lib 1.200 (17.4.2006)\r\n"
|
#define VSTRING "stack.lib 1.199 (6.3.2006)\r\n"
|
||||||
#define VERSTAG "\0$VER: stack.lib 1.200 (17.4.2006)"
|
#define VERSTAG "\0$VER: stack.lib 1.199 (6.3.2006)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
200
|
199
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: stdio_record_locking.c,v 1.16 2006-04-05 08:39:45 obarthel Exp $
|
* $Id: stdio_record_locking.c,v 1.15 2006-01-08 12:04:25 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -1031,7 +1031,7 @@ __handle_record_locking(int cmd,struct flock * l,struct fd * fd,int * error_ptr)
|
|||||||
const int rand_max = RAND_MAX / 65536;
|
const int rand_max = RAND_MAX / 65536;
|
||||||
int num_random_ticks;
|
int num_random_ticks;
|
||||||
|
|
||||||
if(__check_abort_enabled && (SetSignal(0,0) & __break_signal_mask) != 0)
|
if(__check_abort_enabled && (SetSignal(0,0) & SIGBREAKF_CTRL_C) != 0)
|
||||||
{
|
{
|
||||||
SHOWMSG("lock polling loop stopped");
|
SHOWMSG("lock polling loop stopped");
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: time_strftime.c,v 1.19 2006-04-05 06:43:56 obarthel Exp $
|
* $Id: time_strftime.c,v 1.18 2006-01-08 12:04:27 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -59,8 +59,8 @@ struct format_hook_data
|
|||||||
STATIC VOID
|
STATIC VOID
|
||||||
format_hook_function(
|
format_hook_function(
|
||||||
struct Hook * hook,
|
struct Hook * hook,
|
||||||
struct Locale * UNUSED unused_locale,
|
long c,
|
||||||
ULONG c)
|
struct Locale * UNUSED unused_locale)
|
||||||
{
|
{
|
||||||
struct format_hook_data * data = hook->h_Data;
|
struct format_hook_data * data = hook->h_Data;
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ store_string_via_hook(const char * string,int len,struct Hook * hook)
|
|||||||
len = strlen(string);
|
len = strlen(string);
|
||||||
|
|
||||||
while(len-- > 0)
|
while(len-- > 0)
|
||||||
CallHookPkt(hook,NULL,(APTR)((ULONG)(*string++)));
|
CallHookPkt(hook,(APTR)((ULONG)(*string++)),NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: unistd_chown.c,v 1.11 2006-04-05 08:19:11 obarthel Exp $
|
* $Id: unistd_chown.c,v 1.9 2006-01-08 12:04:27 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -54,8 +54,6 @@ chown(const char * path_name, uid_t owner, gid_t group)
|
|||||||
struct name_translation_info path_name_nti;
|
struct name_translation_info path_name_nti;
|
||||||
#endif /* UNIX_PATH_SEMANTICS */
|
#endif /* UNIX_PATH_SEMANTICS */
|
||||||
struct DevProc * dvp = NULL;
|
struct DevProc * dvp = NULL;
|
||||||
BPTR file_lock = ZERO;
|
|
||||||
BOOL owner_changed = TRUE;
|
|
||||||
LONG status;
|
LONG status;
|
||||||
int result = ERROR;
|
int result = ERROR;
|
||||||
|
|
||||||
@@ -82,6 +80,14 @@ chown(const char * path_name, uid_t owner, gid_t group)
|
|||||||
}
|
}
|
||||||
#endif /* CHECK_FOR_NULL_POINTERS */
|
#endif /* CHECK_FOR_NULL_POINTERS */
|
||||||
|
|
||||||
|
if(owner > 65535 || group > 65535)
|
||||||
|
{
|
||||||
|
SHOWMSG("invalid owner or group");
|
||||||
|
|
||||||
|
__set_errno(EINVAL);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(UNIX_PATH_SEMANTICS)
|
#if defined(UNIX_PATH_SEMANTICS)
|
||||||
{
|
{
|
||||||
if(__unix_path_semantics)
|
if(__unix_path_semantics)
|
||||||
@@ -106,118 +112,66 @@ chown(const char * path_name, uid_t owner, gid_t group)
|
|||||||
}
|
}
|
||||||
#endif /* UNIX_PATH_SEMANTICS */
|
#endif /* UNIX_PATH_SEMANTICS */
|
||||||
|
|
||||||
/* A value of -1 for either the owner or the group ID means
|
D(("changing owner of '%s'",path_name));
|
||||||
that what's currently being used should not be changed. */
|
|
||||||
if(owner == (uid_t)-1 || group == (gid_t)-1)
|
|
||||||
{
|
|
||||||
D_S(struct FileInfoBlock,fib);
|
|
||||||
|
|
||||||
|
#if defined(__amigaos4__)
|
||||||
|
{
|
||||||
PROFILE_OFF();
|
PROFILE_OFF();
|
||||||
|
status = SetOwner((STRPTR)path_name,(LONG)((((ULONG)owner) << 16) | group));
|
||||||
/* Try to find out which owner/group information
|
|
||||||
is currently in use. */
|
|
||||||
file_lock = Lock((STRPTR)path_name,SHARED_LOCK);
|
|
||||||
if(file_lock == ZERO || CANNOT Examine(file_lock,fib))
|
|
||||||
{
|
|
||||||
PROFILE_ON();
|
|
||||||
|
|
||||||
__set_errno(__translate_access_io_error_to_errno(IoErr()));
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
UnLock(file_lock);
|
|
||||||
file_lock = ZERO;
|
|
||||||
|
|
||||||
PROFILE_ON();
|
PROFILE_ON();
|
||||||
|
|
||||||
/* Replace the information that should not be changed. */
|
|
||||||
if(owner == (uid_t)-1)
|
|
||||||
owner = fib->fib_OwnerUID;
|
|
||||||
|
|
||||||
if(group == (gid_t)-1)
|
|
||||||
group = fib->fib_OwnerGID;
|
|
||||||
|
|
||||||
/* Is anything different at all? */
|
|
||||||
if(owner == fib->fib_OwnerUID && group == fib->fib_OwnerGID)
|
|
||||||
owner_changed = FALSE;
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
if(owner > 65535 || group > 65535)
|
|
||||||
{
|
{
|
||||||
SHOWMSG("invalid owner or group");
|
if(((struct Library *)DOSBase)->lib_Version >= 39)
|
||||||
|
|
||||||
__set_errno(EINVAL);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(owner_changed)
|
|
||||||
{
|
|
||||||
D(("changing owner of '%s'",path_name));
|
|
||||||
|
|
||||||
#if defined(__amigaos4__)
|
|
||||||
{
|
{
|
||||||
PROFILE_OFF();
|
PROFILE_OFF();
|
||||||
status = SetOwner((STRPTR)path_name,(LONG)((((ULONG)owner) << 16) | group));
|
status = SetOwner((STRPTR)path_name,(LONG)((((ULONG)owner) << 16) | group));
|
||||||
PROFILE_ON();
|
PROFILE_ON();
|
||||||
}
|
}
|
||||||
#else
|
else
|
||||||
{
|
{
|
||||||
if(((struct Library *)DOSBase)->lib_Version >= 39)
|
D_S(struct bcpl_name,new_name);
|
||||||
|
size_t len;
|
||||||
|
|
||||||
|
len = strlen(path_name);
|
||||||
|
if(len >= sizeof(new_name->name))
|
||||||
{
|
{
|
||||||
PROFILE_OFF();
|
__set_errno(ENAMETOOLONG);
|
||||||
status = SetOwner((STRPTR)path_name,(LONG)((((ULONG)owner) << 16) | group));
|
goto out;
|
||||||
PROFILE_ON();
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
PROFILE_OFF();
|
||||||
|
dvp = GetDeviceProc((STRPTR)path_name,NULL);
|
||||||
|
PROFILE_ON();
|
||||||
|
|
||||||
|
if(dvp == NULL)
|
||||||
{
|
{
|
||||||
D_S(struct bcpl_name,new_name);
|
__set_errno(__translate_io_error_to_errno(IoErr()));
|
||||||
size_t len;
|
goto out;
|
||||||
|
|
||||||
len = strlen(path_name);
|
|
||||||
if(len >= sizeof(new_name->name))
|
|
||||||
{
|
|
||||||
__set_errno(ENAMETOOLONG);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
PROFILE_OFF();
|
|
||||||
dvp = GetDeviceProc((STRPTR)path_name,NULL);
|
|
||||||
PROFILE_ON();
|
|
||||||
|
|
||||||
if(dvp == NULL)
|
|
||||||
{
|
|
||||||
__set_errno(__translate_io_error_to_errno(IoErr()));
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
new_name->name[0] = len;
|
|
||||||
memmove(&new_name->name[1],path_name,len);
|
|
||||||
|
|
||||||
PROFILE_OFF();
|
|
||||||
status = DoPkt(dvp->dvp_Port,ACTION_SET_OWNER,dvp->dvp_Lock,MKBADDR(new_name),(LONG)((((ULONG)owner) << 16) | group),0,0);
|
|
||||||
PROFILE_ON();
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif /* __amigaos4__ */
|
|
||||||
|
|
||||||
if(status == DOSFALSE)
|
new_name->name[0] = len;
|
||||||
{
|
memmove(&new_name->name[1],path_name,len);
|
||||||
__set_errno(__translate_io_error_to_errno(IoErr()));
|
|
||||||
goto out;
|
PROFILE_OFF();
|
||||||
|
status = DoPkt(dvp->dvp_Port,ACTION_SET_OWNER,dvp->dvp_Lock,MKBADDR(new_name),(LONG)((((ULONG)owner) << 16) | group),0,0);
|
||||||
|
PROFILE_ON();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* __amigaos4__ */
|
||||||
|
|
||||||
|
if(status == DOSFALSE)
|
||||||
|
{
|
||||||
|
__set_errno(__translate_io_error_to_errno(IoErr()));
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
result = OK;
|
result = OK;
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
||||||
PROFILE_OFF();
|
PROFILE_OFF();
|
||||||
|
|
||||||
FreeDeviceProc(dvp);
|
FreeDeviceProc(dvp);
|
||||||
|
|
||||||
if(file_lock != ZERO)
|
|
||||||
UnLock(file_lock);
|
|
||||||
|
|
||||||
PROFILE_ON();
|
PROFILE_ON();
|
||||||
|
|
||||||
RETURN(result);
|
RETURN(result);
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: unistd_fchown.c,v 1.13 2006-04-05 06:43:56 obarthel Exp $
|
* $Id: unistd_fchown.c,v 1.12 2006-01-08 12:04:27 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -88,6 +88,17 @@ fchown(int file_descriptor, uid_t owner, gid_t group)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(owner > 65535 || group > 65535)
|
||||||
|
{
|
||||||
|
SHOWMSG("owner or group not OK");
|
||||||
|
|
||||||
|
SHOWVALUE(owner);
|
||||||
|
SHOWVALUE(group);
|
||||||
|
|
||||||
|
__set_errno(EINVAL);
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
PROFILE_OFF();
|
PROFILE_OFF();
|
||||||
success = (__safe_examine_file_handle(fd->fd_DefaultFile,fib) && (parent_dir = __safe_parent_of_file_handle(fd->fd_DefaultFile)) != ZERO);
|
success = (__safe_examine_file_handle(fd->fd_DefaultFile,fib) && (parent_dir = __safe_parent_of_file_handle(fd->fd_DefaultFile)) != ZERO);
|
||||||
PROFILE_ON();
|
PROFILE_ON();
|
||||||
@@ -103,86 +114,59 @@ fchown(int file_descriptor, uid_t owner, gid_t group)
|
|||||||
old_current_dir = CurrentDir(parent_dir);
|
old_current_dir = CurrentDir(parent_dir);
|
||||||
current_dir_changed = TRUE;
|
current_dir_changed = TRUE;
|
||||||
|
|
||||||
/* A value of -1 for either the owner or the group ID means
|
PROFILE_OFF();
|
||||||
that what's currently being used should not be changed. */
|
|
||||||
if(owner == (uid_t)-1)
|
|
||||||
owner = fib->fib_OwnerUID;
|
|
||||||
|
|
||||||
if(group == (gid_t)-1)
|
#if defined(__amigaos4__)
|
||||||
group = fib->fib_OwnerGID;
|
|
||||||
|
|
||||||
/* Check if the owner and group IDs are usable. This test
|
|
||||||
follows the comparison against -1 above just so that we
|
|
||||||
can be sure that we are not mistaking a -1 for a
|
|
||||||
large unsigned number. */
|
|
||||||
if(owner > 65535 || group > 65535)
|
|
||||||
{
|
{
|
||||||
SHOWMSG("owner or group not OK");
|
success = SetOwner(fib->fib_FileName,(LONG)((((ULONG)owner) << 16) | group));
|
||||||
|
|
||||||
SHOWVALUE(owner);
|
|
||||||
SHOWVALUE(group);
|
|
||||||
|
|
||||||
__set_errno(EINVAL);
|
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
/* Did anything change at all? */
|
|
||||||
if(group != fib->fib_OwnerUID || owner != fib->fib_OwnerUID)
|
|
||||||
{
|
{
|
||||||
PROFILE_OFF();
|
if(((struct Library *)DOSBase)->lib_Version >= 39)
|
||||||
|
|
||||||
#if defined(__amigaos4__)
|
|
||||||
{
|
{
|
||||||
success = SetOwner(fib->fib_FileName,(LONG)((((ULONG)owner) << 16) | (ULONG)group));
|
success = SetOwner(fib->fib_FileName,(LONG)((((ULONG)owner) << 16) | group));
|
||||||
}
|
}
|
||||||
#else
|
else
|
||||||
{
|
{
|
||||||
if(((struct Library *)DOSBase)->lib_Version >= 39)
|
D_S(struct bcpl_name,new_name);
|
||||||
|
struct DevProc * dvp;
|
||||||
|
unsigned int len;
|
||||||
|
|
||||||
|
SHOWMSG("have to do this manually...");
|
||||||
|
|
||||||
|
success = DOSFALSE;
|
||||||
|
|
||||||
|
len = strlen(fib->fib_FileName);
|
||||||
|
|
||||||
|
assert( len < sizeof(new_name->name) );
|
||||||
|
|
||||||
|
dvp = GetDeviceProc(fib->fib_FileName,NULL);
|
||||||
|
if(dvp != NULL)
|
||||||
{
|
{
|
||||||
success = SetOwner(fib->fib_FileName,(LONG)((((ULONG)owner) << 16) | (ULONG)group));
|
LONG error;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
D_S(struct bcpl_name,new_name);
|
|
||||||
struct DevProc * dvp;
|
|
||||||
unsigned int len;
|
|
||||||
|
|
||||||
SHOWMSG("have to do this manually...");
|
new_name->name[0] = len;
|
||||||
|
memmove(&new_name->name[1],fib->fib_FileName,len);
|
||||||
|
|
||||||
success = DOSFALSE;
|
success = DoPkt(dvp->dvp_Port,ACTION_SET_OWNER,dvp->dvp_Lock,MKBADDR(new_name),(LONG)((((ULONG)owner) << 16) | group),0,0);
|
||||||
|
error = IoErr();
|
||||||
|
|
||||||
len = strlen(fib->fib_FileName);
|
FreeDeviceProc(dvp);
|
||||||
|
|
||||||
assert( len < sizeof(new_name->name) );
|
SetIoErr(error);
|
||||||
|
|
||||||
dvp = GetDeviceProc(fib->fib_FileName,NULL);
|
|
||||||
if(dvp != NULL)
|
|
||||||
{
|
|
||||||
LONG error;
|
|
||||||
|
|
||||||
new_name->name[0] = len;
|
|
||||||
memmove(&new_name->name[1],fib->fib_FileName,len);
|
|
||||||
|
|
||||||
success = DoPkt(dvp->dvp_Port,ACTION_SET_OWNER,dvp->dvp_Lock,MKBADDR(new_name),(LONG)((((ULONG)owner) << 16) | (ULONG)group),0,0);
|
|
||||||
error = IoErr();
|
|
||||||
|
|
||||||
FreeDeviceProc(dvp);
|
|
||||||
|
|
||||||
SetIoErr(error);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* __amigaos4__ */
|
}
|
||||||
|
#endif /* __amigaos4__ */
|
||||||
|
|
||||||
PROFILE_ON();
|
PROFILE_ON();
|
||||||
|
|
||||||
if(NO success)
|
if(NO success)
|
||||||
{
|
{
|
||||||
SHOWMSG("couldn't change owner/group");
|
SHOWMSG("couldn't change owner/group");
|
||||||
|
|
||||||
__set_errno(__translate_io_error_to_errno(IoErr()));
|
__set_errno(__translate_io_error_to_errno(IoErr()));
|
||||||
goto out;
|
goto out;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result = OK;
|
result = OK;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: unistd_headers.h,v 1.10 2006-04-05 06:43:56 obarthel Exp $
|
* $Id: unistd_headers.h,v 1.9 2006-01-08 12:04:27 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -64,24 +64,10 @@ extern struct MinList NOCOMMON __unlink_list;
|
|||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
/* Local timer I/O. */
|
/* Local timer I/O. */
|
||||||
extern struct MsgPort * NOCOMMON __timer_port;
|
extern struct MsgPort * NOCOMMON __timer_port;
|
||||||
extern BOOL NOCOMMON __timer_busy;
|
|
||||||
extern struct Library * NOCOMMON __TimerBase;
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
/* A quick workaround for the timeval/timerequest->TimeVal/TimeRequest
|
|
||||||
change in the recent OS4 header files. */
|
|
||||||
|
|
||||||
#if defined(__NEW_TIMEVAL_DEFINITION_USED__)
|
|
||||||
|
|
||||||
extern struct TimeRequest * NOCOMMON __timer_request;
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
extern struct timerequest * NOCOMMON __timer_request;
|
extern struct timerequest * NOCOMMON __timer_request;
|
||||||
|
extern BOOL NOCOMMON __timer_busy;
|
||||||
#endif /* __NEW_TIMEVAL_DEFINITION_USED__ */
|
extern struct Library * NOCOMMON __TimerBase;
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: unistd_time_delay.c,v 1.9 2006-04-05 08:39:45 obarthel Exp $
|
* $Id: unistd_time_delay.c,v 1.7 2006-01-08 12:04:27 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -47,23 +47,6 @@
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
/* A quick workaround for the timeval/timerequest->TimeVal/TimeRequest
|
|
||||||
change in the recent OS4 header files. */
|
|
||||||
|
|
||||||
#if defined(__NEW_TIMEVAL_DEFINITION_USED__)
|
|
||||||
|
|
||||||
#define timeval TimeVal
|
|
||||||
#define tv_secs Seconds
|
|
||||||
#define tv_micro Microseconds
|
|
||||||
|
|
||||||
#define timerequest TimeRequest
|
|
||||||
#define tr_node Request
|
|
||||||
#define tr_time Time
|
|
||||||
|
|
||||||
#endif /* __NEW_TIMEVAL_DEFINITION_USED__ */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
__time_delay(unsigned long seconds,unsigned long microseconds)
|
__time_delay(unsigned long seconds,unsigned long microseconds)
|
||||||
{
|
{
|
||||||
@@ -103,7 +86,7 @@ __time_delay(unsigned long seconds,unsigned long microseconds)
|
|||||||
SetSignal(0,signals_to_wait_for);
|
SetSignal(0,signals_to_wait_for);
|
||||||
|
|
||||||
if(__check_abort_enabled)
|
if(__check_abort_enabled)
|
||||||
SET_FLAG(signals_to_wait_for,__break_signal_mask);
|
SET_FLAG(signals_to_wait_for,SIGBREAKF_CTRL_C);
|
||||||
|
|
||||||
PROFILE_OFF();
|
PROFILE_OFF();
|
||||||
GetSysTime(&tv);
|
GetSysTime(&tv);
|
||||||
@@ -119,7 +102,7 @@ __time_delay(unsigned long seconds,unsigned long microseconds)
|
|||||||
signals = Wait(signals_to_wait_for);
|
signals = Wait(signals_to_wait_for);
|
||||||
PROFILE_ON();
|
PROFILE_ON();
|
||||||
|
|
||||||
if(FLAG_IS_SET(signals,__break_signal_mask))
|
if(FLAG_IS_SET(signals,SIGBREAKF_CTRL_C))
|
||||||
{
|
{
|
||||||
ULONG seconds_now;
|
ULONG seconds_now;
|
||||||
|
|
||||||
@@ -128,7 +111,7 @@ __time_delay(unsigned long seconds,unsigned long microseconds)
|
|||||||
|
|
||||||
WaitIO((struct IORequest *)__timer_request);
|
WaitIO((struct IORequest *)__timer_request);
|
||||||
|
|
||||||
SetSignal(__break_signal_mask,__break_signal_mask);
|
SetSignal(SIGBREAKF_CTRL_C,SIGBREAKF_CTRL_C);
|
||||||
__check_abort();
|
__check_abort();
|
||||||
|
|
||||||
/* Now figure out how many seconds have elapsed and
|
/* Now figure out how many seconds have elapsed and
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: unistd_timer.c,v 1.10 2006-04-05 06:43:56 obarthel Exp $
|
* $Id: unistd_timer.c,v 1.9 2006-01-08 12:04:27 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -51,18 +51,6 @@
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
/* A quick workaround for the timeval/timerequest->TimeVal/TimeRequest
|
|
||||||
change in the recent OS4 header files. */
|
|
||||||
|
|
||||||
#if defined(__NEW_TIMEVAL_DEFINITION_USED__)
|
|
||||||
|
|
||||||
#define timerequest TimeRequest
|
|
||||||
#define tr_node Request
|
|
||||||
|
|
||||||
#endif /* __NEW_TIMEVAL_DEFINITION_USED__ */
|
|
||||||
|
|
||||||
/****************************************************************************/
|
|
||||||
|
|
||||||
/* Local timer I/O. */
|
/* Local timer I/O. */
|
||||||
struct MsgPort * NOCOMMON __timer_port;
|
struct MsgPort * NOCOMMON __timer_port;
|
||||||
struct timerequest * NOCOMMON __timer_request;
|
struct timerequest * NOCOMMON __timer_request;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: unistd_wildcard_expand.c,v 1.17 2006-04-05 08:39:46 obarthel Exp $
|
* $Id: unistd_wildcard_expand.c,v 1.16 2006-01-08 12:04:27 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -186,7 +186,7 @@ __wildcard_expand_init(void)
|
|||||||
{
|
{
|
||||||
ap = AllocDosObjectTags(DOS_ANCHORPATH,
|
ap = AllocDosObjectTags(DOS_ANCHORPATH,
|
||||||
ADO_Strlen, 2 * MAXPATHLEN,
|
ADO_Strlen, 2 * MAXPATHLEN,
|
||||||
ADO_Mask, (__check_abort_enabled) ? __break_signal_mask : 0,
|
ADO_Mask, (__check_abort_enabled) ? SIGBREAKF_CTRL_C : 0,
|
||||||
TAG_END);
|
TAG_END);
|
||||||
|
|
||||||
if(ap == NULL)
|
if(ap == NULL)
|
||||||
@@ -214,7 +214,7 @@ __wildcard_expand_init(void)
|
|||||||
ap->ap_Strlen = MAXPATHLEN;
|
ap->ap_Strlen = MAXPATHLEN;
|
||||||
|
|
||||||
if(__check_abort_enabled)
|
if(__check_abort_enabled)
|
||||||
ap->ap_BreakBits = __break_signal_mask;
|
ap->ap_BreakBits = SIGBREAKF_CTRL_C;
|
||||||
}
|
}
|
||||||
#endif /* __amigaos4__ */
|
#endif /* __amigaos4__ */
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ __wildcard_expand_init(void)
|
|||||||
{
|
{
|
||||||
__set_process_window(old_window_pointer);
|
__set_process_window(old_window_pointer);
|
||||||
|
|
||||||
SetSignal(__break_signal_mask,__break_signal_mask);
|
SetSignal(SIGBREAKF_CTRL_C,SIGBREAKF_CTRL_C);
|
||||||
__check_abort();
|
__check_abort();
|
||||||
|
|
||||||
old_window_pointer = __set_process_window((APTR)-1);
|
old_window_pointer = __set_process_window((APTR)-1);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 200
|
#define REVISION 199
|
||||||
#define DATE "17.4.2006"
|
#define DATE "6.3.2006"
|
||||||
#define VERS "unix.lib 1.200"
|
#define VERS "unix.lib 1.199"
|
||||||
#define VSTRING "unix.lib 1.200 (17.4.2006)\r\n"
|
#define VSTRING "unix.lib 1.199 (6.3.2006)\r\n"
|
||||||
#define VERSTAG "\0$VER: unix.lib 1.200 (17.4.2006)"
|
#define VERSTAG "\0$VER: unix.lib 1.199 (6.3.2006)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
200
|
199
|
||||||
|
|||||||
Reference in New Issue
Block a user