2002-06-27 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/_types.h: Define _ssize_t as int if int is
        32-bits, otherwise define it as long.
        * libc/include/sys/types.h: Include <_ansi.h> and <sys/_types.h>
        and define ssize_t as _ssize_t.
        * libc/reent/readr.c: Change return type to _ssize_t.
        * libc/reent/writer.c: Ditto.
        * libc/sys/linux/Makefile.am: Add aio.c.
        * libc/sys/linux/Makefile.in: Regenerated.
        * libc/sys/linux/aio.c: New file.
        * libc/sys/linux/sys/cdefs.h: Add __restrict_arr definition.
        * libm/common/fdlibm.h: Undef __P before defining it.
			
			
This commit is contained in:
		| @@ -1,3 +1,17 @@ | ||||
| 2002-06-27  Jeff Johnston  <jjohnstn@redhat.com> | ||||
|  | ||||
|         * libc/include/sys/_types.h: Define _ssize_t as int if int is | ||||
|         32-bits, otherwise define it as long. | ||||
|         * libc/include/sys/types.h: Include <_ansi.h> and <sys/_types.h> | ||||
|         and define ssize_t as _ssize_t. | ||||
|         * libc/reent/readr.c: Change return type to _ssize_t. | ||||
|         * libc/reent/writer.c: Ditto. | ||||
|         * libc/sys/linux/Makefile.am: Add aio.c. | ||||
|         * libc/sys/linux/Makefile.in: Regenerated. | ||||
|         * libc/sys/linux/aio.c: New file. | ||||
|         * libc/sys/linux/sys/cdefs.h: Add __restrict_arr definition. | ||||
|         * libm/common/fdlibm.h: Undef __P before defining it. | ||||
|  | ||||
| 2002-06-27  Thomas Fitzsimmons  <fitzsim@redhat.com> | ||||
|  | ||||
| 	* libm/mathfp/s_pow.c (pow): Fix checks on variable k.  Add | ||||
|   | ||||
| @@ -10,6 +10,11 @@ | ||||
| #define _SYS__TYPES_H | ||||
|  | ||||
| typedef long _off_t; | ||||
|  | ||||
| #if defined(__INT_MAX__) && __INT_MAX__ == 2147483647 | ||||
| typedef int _ssize_t; | ||||
| #else | ||||
| typedef long _ssize_t; | ||||
| #endif | ||||
|  | ||||
| #endif	/* _SYS__TYPES_H */ | ||||
|   | ||||
| @@ -18,6 +18,9 @@ | ||||
| #ifndef _SYS_TYPES_H | ||||
| #define _SYS_TYPES_H | ||||
|  | ||||
| #include <_ansi.h> | ||||
| #include <sys/_types.h> | ||||
|  | ||||
| #if defined (_WIN32) || defined (__CYGWIN__) | ||||
| #define __MS_types__ | ||||
| #endif | ||||
| @@ -158,7 +161,7 @@ typedef	unsigned short	gid_t; | ||||
|  | ||||
| typedef int pid_t; | ||||
| typedef	long key_t; | ||||
| typedef long ssize_t; | ||||
| typedef _ssize_t ssize_t; | ||||
|  | ||||
| #ifdef __MS_types__ | ||||
| typedef	char *	addr_t; | ||||
|   | ||||
| @@ -28,12 +28,12 @@ INDEX | ||||
|  | ||||
| ANSI_SYNOPSIS | ||||
| 	#include <reent.h> | ||||
| 	long _read_r(struct _reent *<[ptr]>, | ||||
| 	_ssize_t _read_r(struct _reent *<[ptr]>, | ||||
| 		         int <[fd]>, void *<[buf]>, size_t <[cnt]>); | ||||
|  | ||||
| TRAD_SYNOPSIS | ||||
| 	#include <reent.h> | ||||
| 	long _read_r(<[ptr]>, <[fd]>, <[buf]>, <[cnt]>) | ||||
| 	_ssize_t _read_r(<[ptr]>, <[fd]>, <[buf]>, <[cnt]>) | ||||
| 	struct _reent *<[ptr]>; | ||||
| 	int <[fd]>; | ||||
| 	char *<[buf]>; | ||||
| @@ -45,17 +45,17 @@ DESCRIPTION | ||||
| 	<<errno>>. | ||||
| */ | ||||
|  | ||||
| long | ||||
| _ssize_t | ||||
| _read_r (ptr, fd, buf, cnt) | ||||
|      struct _reent *ptr; | ||||
|      int fd; | ||||
|      _PTR buf; | ||||
|      size_t cnt; | ||||
| { | ||||
|   long ret; | ||||
|   _ssize_t ret; | ||||
|  | ||||
|   errno = 0; | ||||
|   if ((ret = _read (fd, buf, cnt)) == -1 && errno != 0) | ||||
|   if ((ret = (_ssize_t)_read (fd, buf, cnt)) == -1 && errno != 0) | ||||
|     ptr->_errno = errno; | ||||
|   return ret; | ||||
| } | ||||
|   | ||||
| @@ -28,12 +28,12 @@ INDEX | ||||
|  | ||||
| ANSI_SYNOPSIS | ||||
| 	#include <reent.h> | ||||
| 	long _write_r(struct _reent *<[ptr]>, | ||||
| 	_ssize_t _write_r(struct _reent *<[ptr]>, | ||||
| 		          int <[fd]>, const void *<[buf]>, size_t <[cnt]>); | ||||
|  | ||||
| TRAD_SYNOPSIS | ||||
| 	#include <reent.h> | ||||
| 	long _write_r(<[ptr]>, <[fd]>, <[buf]>, <[cnt]>) | ||||
| 	_ssize_t _write_r(<[ptr]>, <[fd]>, <[buf]>, <[cnt]>) | ||||
| 	struct _reent *<[ptr]>; | ||||
| 	int <[fd]>; | ||||
| 	char *<[buf]>; | ||||
| @@ -45,17 +45,17 @@ DESCRIPTION | ||||
| 	<<errno>>. | ||||
| */ | ||||
|  | ||||
| long | ||||
| _ssize_t | ||||
| _write_r (ptr, fd, buf, cnt) | ||||
|      struct _reent *ptr; | ||||
|      int fd; | ||||
|      _CONST _PTR buf; | ||||
|      size_t cnt; | ||||
| { | ||||
|   long ret; | ||||
|   _ssize_t ret; | ||||
|  | ||||
|   errno = 0; | ||||
|   if ((ret = _write (fd, buf, cnt)) == -1 && errno != 0) | ||||
|   if ((ret = (_ssize_t)_write (fd, buf, cnt)) == -1 && errno != 0) | ||||
|     ptr->_errno = errno; | ||||
|   return ret; | ||||
| } | ||||
|   | ||||
| @@ -10,6 +10,7 @@ SUBLIBS = \ | ||||
| 	$(LINUX_MACH_LIB) | ||||
|  | ||||
| LIB_SOURCES = \ | ||||
| 	aio.c \ | ||||
| 	brk.c \ | ||||
| 	cfspeed.c \ | ||||
| 	clock_getres.c \ | ||||
|   | ||||
| @@ -107,6 +107,7 @@ SUBLIBS = \ | ||||
|  | ||||
|  | ||||
| LIB_SOURCES = \ | ||||
| 	aio.c \ | ||||
| 	brk.c \ | ||||
| 	cfspeed.c \ | ||||
| 	clock_getres.c \ | ||||
| @@ -208,15 +209,16 @@ LIBRARIES =  $(noinst_LIBRARIES) | ||||
| DEFS = @DEFS@ -I. -I$(srcdir)  | ||||
| CPPFLAGS = @CPPFLAGS@ | ||||
| LIBS = @LIBS@ | ||||
| @USE_LIBTOOL_FALSE@lib_a_OBJECTS =  brk.$(OBJEXT) cfspeed.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@clock_getres.$(OBJEXT) clock_gettime.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@clock_settime.$(OBJEXT) flockfile.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@ftok.$(OBJEXT) funlockfile.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@getdate.$(OBJEXT) getdate_err.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@gethostname.$(OBJEXT) getoptlong.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@getreent.$(OBJEXT) ids.$(OBJEXT) inode.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@io.$(OBJEXT) io64.$(OBJEXT) ipc.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@linux.$(OBJEXT) mmap.$(OBJEXT) mq_close.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@lib_a_OBJECTS =  aio.$(OBJEXT) brk.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@cfspeed.$(OBJEXT) clock_getres.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@clock_gettime.$(OBJEXT) clock_settime.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@flockfile.$(OBJEXT) ftok.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@funlockfile.$(OBJEXT) getdate.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@getdate_err.$(OBJEXT) gethostname.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@getoptlong.$(OBJEXT) getreent.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@ids.$(OBJEXT) inode.$(OBJEXT) io.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@io64.$(OBJEXT) ipc.$(OBJEXT) linux.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@mmap.$(OBJEXT) mq_close.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@mq_getattr.$(OBJEXT) mq_notify.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@mq_open.$(OBJEXT) mq_receive.$(OBJEXT) \ | ||||
| @USE_LIBTOOL_FALSE@mq_send.$(OBJEXT) mq_setattr.$(OBJEXT) \ | ||||
| @@ -238,7 +240,7 @@ LIBS = @LIBS@ | ||||
| @USE_LIBTOOL_FALSE@usleep.$(OBJEXT) wait.$(OBJEXT) | ||||
| LTLIBRARIES =  $(noinst_LTLIBRARIES) | ||||
|  | ||||
| @USE_LIBTOOL_TRUE@liblinux_la_OBJECTS =  brk.lo cfspeed.lo \ | ||||
| @USE_LIBTOOL_TRUE@liblinux_la_OBJECTS =  aio.lo brk.lo cfspeed.lo \ | ||||
| @USE_LIBTOOL_TRUE@clock_getres.lo clock_gettime.lo clock_settime.lo \ | ||||
| @USE_LIBTOOL_TRUE@flockfile.lo ftok.lo funlockfile.lo getdate.lo \ | ||||
| @USE_LIBTOOL_TRUE@getdate_err.lo gethostname.lo getoptlong.lo \ | ||||
|   | ||||
							
								
								
									
										67
									
								
								newlib/libc/sys/linux/aio.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								newlib/libc/sys/linux/aio.c
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,67 @@ | ||||
| /* libc/sys/linux/aio.c - asychronous I/O */ | ||||
|  | ||||
| /* Copyright 2002, Red Hat Inc. */ | ||||
|  | ||||
| /* Currently asynchronous I/O is not implemented. */ | ||||
|  | ||||
| #include <sys/types.h> | ||||
| #include <aio.h> | ||||
| #include <errno.h> | ||||
|  | ||||
| int | ||||
| aio_cancel (int fd, struct aiocb *cb) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
| } | ||||
|  | ||||
| int | ||||
| aio_error (const struct aiocb *cb) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
| } | ||||
|  | ||||
| int | ||||
| aio_fsync (int op, struct aiocb *cb) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
| } | ||||
|  | ||||
| int | ||||
| aio_read (struct aiocb *cb) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
| } | ||||
|  | ||||
| ssize_t | ||||
| aio_return (struct aiocb *cb) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
| } | ||||
|  | ||||
| int | ||||
| aio_suspend (const struct aiocb *const list[], int nent, | ||||
|              const struct timespec *timeout) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
| } | ||||
|  | ||||
| int | ||||
| aio_write (struct aiocb *cb) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
| } | ||||
|  | ||||
| int | ||||
| lio_listio (int mode, struct aiocb * const list[], int nent, | ||||
|             struct sigevent *sig) | ||||
| { | ||||
|   errno = ENOSYS; | ||||
|   return -1; | ||||
| } | ||||
| @@ -65,6 +65,7 @@ | ||||
| #define __attribute_pure__ | ||||
| #define __attribute_format_strfmon__(a,b) | ||||
| #define __flexarr      [0] | ||||
| #define __restrict_arr | ||||
|  | ||||
| #ifdef  __cplusplus | ||||
| # define __BEGIN_DECLS  extern "C" { | ||||
| @@ -80,6 +81,7 @@ | ||||
| # define __ptrvalue     /* nothing */ | ||||
| #endif | ||||
|  | ||||
|  | ||||
| #ifdef __GNUC__ | ||||
| #define	__strong_reference(sym,aliassym)	\ | ||||
| 	extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))); | ||||
|   | ||||
| @@ -124,6 +124,7 @@ | ||||
| #endif | ||||
|  | ||||
| #ifdef __STDC__ | ||||
| #undef __P | ||||
| #define	__P(p)	p | ||||
| #else | ||||
| #define	__P(p)	() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user