Thu Mar 9 17:20:41 2000 Jeff Johnston <jjohnstn@cygnus.com>

* libc/include/string.h: Changed last argument back to ssize_t
        to make it compatible with XPG4 definition which is
        defined in <unistd.h>.  There is a conflict in the SVID 3
        and XPG4 definitions and newlib will settle with XPG4.
        * libc/string/swab.c: Ditto.
This commit is contained in:
Jeff Johnston 2000-03-09 22:25:01 +00:00
parent af1dc7ccea
commit e9c9497815
3 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,11 @@
Thu Mar 9 17:20:41 2000 Jeff Johnston <jjohnstn@cygnus.com>
* libc/include/string.h: Changed last argument back to ssize_t
to make it compatible with XPG4 definition which is
defined in <unistd.h>. There is a conflict in the SVID 3
and XPG4 definitions and newlib will settle with XPG4.
* libc/string/swab.c: Ditto.
Wed Mar 8 17:11:41 2000 Jeff Johnston <jjohnstn@cygnus.com> Wed Mar 8 17:11:41 2000 Jeff Johnston <jjohnstn@cygnus.com>
* libc/include/string.h: Changed last argument to size_t. * libc/include/string.h: Changed last argument to size_t.

View File

@ -69,7 +69,7 @@ char *_EXFUN(strupr,(char *));
char *_EXFUN(strsignal, (int __signo)); char *_EXFUN(strsignal, (int __signo));
int _EXFUN(strtosigno, (const char *__name)); int _EXFUN(strtosigno, (const char *__name));
#endif #endif
void _EXFUN(swab,(const void *, void *, size_t)); void _EXFUN(swab,(const void *, void *, ssize_t));
/* These function names are used on Windows and perhaps other systems. */ /* These function names are used on Windows and perhaps other systems. */
#ifndef strcmpi #ifndef strcmpi

View File

@ -4,13 +4,13 @@ FUNCTION
ANSI_SYNOPSIS ANSI_SYNOPSIS
#include <string.h> #include <string.h>
void swab(const void *<[in]>, void *<[out]>, size_t <[n]>); void swab(const void *<[in]>, void *<[out]>, ssize_t <[n]>);
TRAD_SYNOPSIS TRAD_SYNOPSIS
void swab(<[in]>, <[out]>, <[n]> void swab(<[in]>, <[out]>, <[n]>
void *<[in]>; void *<[in]>;
void *<[out]>; void *<[out]>;
size_t <[n]>; ssize_t <[n]>;
DESCRIPTION DESCRIPTION
This function copies <[n]> bytes from the memory region This function copies <[n]> bytes from the memory region
@ -27,11 +27,11 @@ void
_DEFUN (swab, (b1, b2, length), _DEFUN (swab, (b1, b2, length),
_CONST void *b1 _AND _CONST void *b1 _AND
void *b2 _AND void *b2 _AND
size_t length) ssize_t length)
{ {
const char *from = b1; const char *from = b1;
char *to = b2; char *to = b2;
size_t ptr; ssize_t ptr;
for (ptr = 1; ptr < length; ptr += 2) for (ptr = 1; ptr < length; ptr += 2)
{ {
char p = from[ptr]; char p = from[ptr];