mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
c.lib 1.173 (25.8.2004)
- The <assert.h> header file was missing the C++ 'extern "C" { .. }'
declarations.
- Added a new function __get_default_file() which allows direct access
to the low level file handle/socket descriptor associated with a
file descriptor.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14716 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: GNUmakefile.68k,v 1.7 2004-08-23 13:47:32 obarthel Exp $
|
# $Id: GNUmakefile.68k,v 1.8 2004-08-25 15:27:27 obarthel Exp $
|
||||||
#
|
#
|
||||||
# :ts=8
|
# :ts=8
|
||||||
#
|
#
|
||||||
@@ -144,6 +144,7 @@ C_LIB = \
|
|||||||
fcntl_open.o \
|
fcntl_open.o \
|
||||||
fcntl_read.o \
|
fcntl_read.o \
|
||||||
fcntl_write.o \
|
fcntl_write.o \
|
||||||
|
fcntl_get_default_file.o \
|
||||||
libgen_basename.o \
|
libgen_basename.o \
|
||||||
libgen_dirname.o \
|
libgen_dirname.o \
|
||||||
locale_data.o \
|
locale_data.o \
|
||||||
@@ -395,6 +396,7 @@ UNIX_LIB = \
|
|||||||
fcntl_creat.o \
|
fcntl_creat.o \
|
||||||
fcntl_fcntl.o \
|
fcntl_fcntl.o \
|
||||||
fcntl_open.o \
|
fcntl_open.o \
|
||||||
|
fcntl_get_default_file.o \
|
||||||
mount_convertinfo.o \
|
mount_convertinfo.o \
|
||||||
mount_statfs.o \
|
mount_statfs.o \
|
||||||
stat_chmod.o \
|
stat_chmod.o \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: GNUmakefile.os4,v 1.5 2004-08-16 09:33:11 obarthel Exp $
|
# $Id: GNUmakefile.os4,v 1.6 2004-08-25 15:27:27 obarthel Exp $
|
||||||
#
|
#
|
||||||
# :ts=8
|
# :ts=8
|
||||||
#
|
#
|
||||||
@@ -138,6 +138,7 @@ C_LIB = \
|
|||||||
fcntl_open.o \
|
fcntl_open.o \
|
||||||
fcntl_read.o \
|
fcntl_read.o \
|
||||||
fcntl_write.o \
|
fcntl_write.o \
|
||||||
|
fcntl_get_default_file.o \
|
||||||
libgen_basename.o \
|
libgen_basename.o \
|
||||||
libgen_dirname.o \
|
libgen_dirname.o \
|
||||||
locale_data.o \
|
locale_data.o \
|
||||||
@@ -387,6 +388,7 @@ UNIX_LIB = \
|
|||||||
fcntl_creat.o \
|
fcntl_creat.o \
|
||||||
fcntl_fcntl.o \
|
fcntl_fcntl.o \
|
||||||
fcntl_open.o \
|
fcntl_open.o \
|
||||||
|
fcntl_get_default_file.o \
|
||||||
mount_convertinfo.o \
|
mount_convertinfo.o \
|
||||||
mount_statfs.o \
|
mount_statfs.o \
|
||||||
stat_chmod.o \
|
stat_chmod.o \
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 172
|
#define REVISION 173
|
||||||
#define DATE "21.8.2004"
|
#define DATE "25.8.2004"
|
||||||
#define VERS "amiga.lib 1.172"
|
#define VERS "amiga.lib 1.173"
|
||||||
#define VSTRING "amiga.lib 1.172 (21.8.2004)\r\n"
|
#define VSTRING "amiga.lib 1.173 (25.8.2004)\r\n"
|
||||||
#define VERSTAG "\0$VER: amiga.lib 1.172 (21.8.2004)"
|
#define VERSTAG "\0$VER: amiga.lib 1.173 (25.8.2004)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
172
|
173
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 172
|
#define REVISION 173
|
||||||
#define DATE "21.8.2004"
|
#define DATE "25.8.2004"
|
||||||
#define VERS "c.lib 1.172"
|
#define VERS "c.lib 1.173"
|
||||||
#define VSTRING "c.lib 1.172 (21.8.2004)\r\n"
|
#define VSTRING "c.lib 1.173 (25.8.2004)\r\n"
|
||||||
#define VERSTAG "\0$VER: c.lib 1.172 (21.8.2004)"
|
#define VERSTAG "\0$VER: c.lib 1.173 (25.8.2004)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
172
|
173
|
||||||
|
|||||||
@@ -1,3 +1,13 @@
|
|||||||
|
c.lib 1.173 (25.8.2004)
|
||||||
|
|
||||||
|
- The <assert.h> header file was missing the C++ 'extern "C" { .. }'
|
||||||
|
declarations.
|
||||||
|
|
||||||
|
- Added a new function __get_default_file() which allows direct access
|
||||||
|
to the low level file handle/socket descriptor associated with a
|
||||||
|
file descriptor.
|
||||||
|
|
||||||
|
|
||||||
c.lib 1.172 (21.8.2004)
|
c.lib 1.172 (21.8.2004)
|
||||||
|
|
||||||
- acos() now returns 0 for a domain error.
|
- acos() now returns 0 for a domain error.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 172
|
#define REVISION 173
|
||||||
#define DATE "21.8.2004"
|
#define DATE "25.8.2004"
|
||||||
#define VERS "debug.lib 1.172"
|
#define VERS "debug.lib 1.173"
|
||||||
#define VSTRING "debug.lib 1.172 (21.8.2004)\r\n"
|
#define VSTRING "debug.lib 1.173 (25.8.2004)\r\n"
|
||||||
#define VERSTAG "\0$VER: debug.lib 1.172 (21.8.2004)"
|
#define VERSTAG "\0$VER: debug.lib 1.173 (25.8.2004)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
172
|
173
|
||||||
|
|||||||
69
library/fcntl_get_default_file.c
Normal file
69
library/fcntl_get_default_file.c
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
* $Id: fcntl_get_default_file.c,v 1.1 2004-08-25 15:27:27 obarthel Exp $
|
||||||
|
*
|
||||||
|
* :ts=4
|
||||||
|
*
|
||||||
|
* Portable ISO 'C' (1994) runtime library for the Amiga computer
|
||||||
|
* Copyright (c) 2002-2004 by Olaf Barthel <olsen@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 _FCNTL_HEADERS_H
|
||||||
|
#include "fcntl_headers.h"
|
||||||
|
#endif /* _FCNTL_HEADERS_H */
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
/* The following is not part of the ISO 'C' (1994) standard. */
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
|
int
|
||||||
|
__get_default_file(int file_descriptor,long * file_ptr)
|
||||||
|
{
|
||||||
|
struct fd * fd;
|
||||||
|
int result = -1;
|
||||||
|
|
||||||
|
assert( file_descriptor >= 0 && file_descriptor < __num_fd );
|
||||||
|
assert( __fd[file_descriptor] != NULL );
|
||||||
|
assert( FLAG_IS_SET(__fd[file_descriptor]->fd_Flags,FDF_IN_USE) );
|
||||||
|
assert( file_ptr != NULL );
|
||||||
|
|
||||||
|
fd = __get_file_descriptor(file_descriptor);
|
||||||
|
if(fd == NULL)
|
||||||
|
{
|
||||||
|
errno = EBADF;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
(*file_ptr) = (long)fd->fd_DefaultFile;
|
||||||
|
|
||||||
|
result = 0;
|
||||||
|
|
||||||
|
out:
|
||||||
|
|
||||||
|
return(result);
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: assert.h,v 1.1.1.1 2004-07-26 16:32:49 obarthel Exp $
|
* $Id: assert.h,v 1.2 2004-08-25 15:27:28 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -36,6 +36,12 @@
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
#ifndef assert
|
#ifndef assert
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
@@ -67,4 +73,10 @@ extern void __assertion_failure(const char *file_name,int line_number,const char
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
#endif /* _ASSERT_H */
|
#endif /* _ASSERT_H */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: dos.h,v 1.2 2004-08-07 09:15:33 obarthel Exp $
|
* $Id: dos.h,v 1.3 2004-08-25 15:27:28 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -112,6 +112,18 @@ extern void __set_a4(unsigned long value);
|
|||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Obtain the low level 'file' handle or socket ID bound to a file
|
||||||
|
* descriptor. This function returns 0 for success and non-zero
|
||||||
|
* otherwise (if, for example, the file descriptor value you
|
||||||
|
* provided is not valid; errno will be set to the appropriate
|
||||||
|
* error code, too). Put a pointer to the file handle variable you
|
||||||
|
* want to be filled in into the second parameter to this function.
|
||||||
|
*/
|
||||||
|
extern int __get_default_file(int file_descriptor,long * file_ptr);
|
||||||
|
|
||||||
|
/****************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This will be set to TRUE if the current program was launched from
|
* This will be set to TRUE if the current program was launched from
|
||||||
* the internet superserver ('inetd') or an equivalent facility.
|
* the internet superserver ('inetd') or an equivalent facility.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: stdio.h,v 1.2 2004-08-07 09:15:33 obarthel Exp $
|
* $Id: stdio.h,v 1.3 2004-08-25 15:27:28 obarthel Exp $
|
||||||
*
|
*
|
||||||
* :ts=4
|
* :ts=4
|
||||||
*
|
*
|
||||||
@@ -62,7 +62,7 @@ extern "C" {
|
|||||||
* correspond to a real limitation for this 'C' runtime library and is
|
* correspond to a real limitation for this 'C' runtime library and is
|
||||||
* included solely for ISO 'C' (1994) compliance.
|
* included solely for ISO 'C' (1994) compliance.
|
||||||
*/
|
*/
|
||||||
#define FOPEN_MAX 8
|
#define FOPEN_MAX 64
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 172
|
#define REVISION 173
|
||||||
#define DATE "21.8.2004"
|
#define DATE "25.8.2004"
|
||||||
#define VERS "m.lib 1.172"
|
#define VERS "m.lib 1.173"
|
||||||
#define VSTRING "m.lib 1.172 (21.8.2004)\r\n"
|
#define VSTRING "m.lib 1.173 (25.8.2004)\r\n"
|
||||||
#define VERSTAG "\0$VER: m.lib 1.172 (21.8.2004)"
|
#define VERSTAG "\0$VER: m.lib 1.173 (25.8.2004)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
172
|
173
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 172
|
#define REVISION 173
|
||||||
#define DATE "21.8.2004"
|
#define DATE "25.8.2004"
|
||||||
#define VERS "m881.lib 1.172"
|
#define VERS "m881.lib 1.173"
|
||||||
#define VSTRING "m881.lib 1.172 (21.8.2004)\r\n"
|
#define VSTRING "m881.lib 1.173 (25.8.2004)\r\n"
|
||||||
#define VERSTAG "\0$VER: m881.lib 1.172 (21.8.2004)"
|
#define VERSTAG "\0$VER: m881.lib 1.173 (25.8.2004)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
172
|
173
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 172
|
#define REVISION 173
|
||||||
#define DATE "21.8.2004"
|
#define DATE "25.8.2004"
|
||||||
#define VERS "net.lib 1.172"
|
#define VERS "net.lib 1.173"
|
||||||
#define VSTRING "net.lib 1.172 (21.8.2004)\r\n"
|
#define VSTRING "net.lib 1.173 (25.8.2004)\r\n"
|
||||||
#define VERSTAG "\0$VER: net.lib 1.172 (21.8.2004)"
|
#define VERSTAG "\0$VER: net.lib 1.173 (25.8.2004)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
172
|
173
|
||||||
|
|||||||
@@ -1,15 +1,7 @@
|
|||||||
c.lib 1.172 (21.8.2004)
|
c.lib 1.173 (25.8.2004)
|
||||||
|
|
||||||
- Changed the values which the acos(), asin(), atan2(), fmod()
|
- You can now retrieve the low level file handle or socket descriptor
|
||||||
and sqrt() functions return when they find that their parameters
|
that is associated with a file descriptor, as used by this runtime
|
||||||
are invalid.
|
library. The new function is called "__get_default_file()", and the
|
||||||
|
function prototype and documentation can be found in the <dos.h>
|
||||||
- The atan2() function failed to perform a correct parameter check.
|
header file.
|
||||||
|
|
||||||
|
|
||||||
c.lib 1.171 (16.8.2004)
|
|
||||||
|
|
||||||
- Added hypot()
|
|
||||||
|
|
||||||
- vfprintf/vfscanf now support the %lld/%llu (64 bit integer) format
|
|
||||||
by default
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# $Id: smakefile,v 1.6 2004-08-16 09:33:12 obarthel Exp $
|
# $Id: smakefile,v 1.7 2004-08-25 15:27:27 obarthel Exp $
|
||||||
#
|
#
|
||||||
# :ts=8
|
# :ts=8
|
||||||
#
|
#
|
||||||
@@ -163,7 +163,8 @@ FCNTL_OBJ = \
|
|||||||
fcntl_lseek.o \
|
fcntl_lseek.o \
|
||||||
fcntl_open.o \
|
fcntl_open.o \
|
||||||
fcntl_read.o \
|
fcntl_read.o \
|
||||||
fcntl_write.o
|
fcntl_write.o \
|
||||||
|
fcntl_get_default_file.o
|
||||||
|
|
||||||
LIBGEN_OBJ = \
|
LIBGEN_OBJ = \
|
||||||
libgen_basename.o \
|
libgen_basename.o \
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 172
|
#define REVISION 173
|
||||||
#define DATE "21.8.2004"
|
#define DATE "25.8.2004"
|
||||||
#define VERS "stack.lib 1.172"
|
#define VERS "stack.lib 1.173"
|
||||||
#define VSTRING "stack.lib 1.172 (21.8.2004)\r\n"
|
#define VSTRING "stack.lib 1.173 (25.8.2004)\r\n"
|
||||||
#define VERSTAG "\0$VER: stack.lib 1.172 (21.8.2004)"
|
#define VERSTAG "\0$VER: stack.lib 1.173 (25.8.2004)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
172
|
173
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#define VERSION 1
|
#define VERSION 1
|
||||||
#define REVISION 172
|
#define REVISION 173
|
||||||
#define DATE "21.8.2004"
|
#define DATE "25.8.2004"
|
||||||
#define VERS "unix.lib 1.172"
|
#define VERS "unix.lib 1.173"
|
||||||
#define VSTRING "unix.lib 1.172 (21.8.2004)\r\n"
|
#define VSTRING "unix.lib 1.173 (25.8.2004)\r\n"
|
||||||
#define VERSTAG "\0$VER: unix.lib 1.172 (21.8.2004)"
|
#define VERSTAG "\0$VER: unix.lib 1.173 (25.8.2004)"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
172
|
173
|
||||||
|
|||||||
Reference in New Issue
Block a user