Ignore:
Timestamp:
Oct 22, 2014, 9:17:00 PM (11 years ago)
Author:
bird
Message:

trunk+0.6: Modified the existing swab() function in string.h to be standard compliant (signed last argument, don't copy negative counts, truncate odd values instead of ignoring them). Fixes #281.

Location:
branches/libc-0.6/src/emx/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/include/string.h

    r3809 r3899  
    120120size_t   strxfrm(char * __restrict, const char * __restrict, size_t);
    121121#if __BSD_VISIBLE
    122 void     swab(const void *, void *, size_t);
     122# ifndef _SWAB_DECLARED                                 /* bird: also in unistd.h */
     123#  define _SWAB_DECLARED                                /* bird: also in unistd.h */
     124#  if !defined(_SSIZE_T_DECLARED) && !defined(_SSIZE_T)
     125typedef __ssize_t       ssize_t;
     126#   define _SSIZE_T_DECLARED
     127#   define _SSIZE_T
     128#  endif
     129void     swab(const void * __restrict, void * __restrict, ssize_t);
     130# endif /* !_SWAB_DECLARED */                           /* bird: also in unistd.h  */
    123131#endif
    124132
  • branches/libc-0.6/src/emx/include/unistd.h

    r2455 r3899  
    455455int      setregid(gid_t, gid_t);
    456456int      setreuid(uid_t, uid_t);
    457 /* void  swab(const void * __restrict, void * __restrict, ssize_t); */
     457
     458#ifndef _SWAB_DECLARED                                  /* bird: also in string.h */
     459# define _SWAB_DECLARED                                 /* bird: also in string.h */
     460void     swab(const void * __restrict, void * __restrict, ssize_t);
     461#endif /* !_SWAB_DECLARED */                            /* bird: also in string.h */
    458462void     sync(void);
    459463useconds_t       ualarm(useconds_t, useconds_t);
Note: See TracChangeset for help on using the changeset viewer.