Ignore:
Timestamp:
Jun 17, 2005, 6:32:39 AM (20 years ago)
Author:
bird
Message:

Porting to 64-bit FreeBSD...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libctests/glibc/string/test-string.h

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.2
    r2043 r2044  
    5252#define GLRO(x) _##x
    5353#include <hp-timing.h>
     54
     55/* bird added for bsd */
     56#ifndef TEMP_FAILURE_RETRY /* special GNU idea */
     57# define TEMP_FAILURE_RETRY(expression) \
     58  (__extension__                                                              \
     59    ({ long int __result;                                                     \
     60       do __result = (long int) (expression);                                 \
     61       while (__result == -1L && errno == EINTR);                             \
     62       __result; }))
     63#endif
     64#ifndef HAVE_STRNLEN
     65static inline size_t strnlen(const char *psz, size_t cch)
     66{
     67    const char *psz2 = psz;
     68    while (cch > 0 && *psz)
     69        cch--, psz++;
     70    return psz - psz2;
     71}
     72#endif
    5473
    5574
Note: See TracChangeset for help on using the changeset viewer.