Changeset a81de3f in rtems


Ignore:
Timestamp:
Jun 12, 2007, 7:06:16 AM (13 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
61159ed
Parents:
e98fc44
Message:

Eliminate my_strdup, my_strndup.

Location:
cpukit/shttpd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/shttpd/defs.h

    re98fc44 ra81de3f  
    378378extern int      my_strncasecmp(register const char *,
    379379                register const char *, size_t);
     380#ifndef HAVE_STRNDUP
    380381extern char     *my_strndup(const char *ptr, size_t len);
     382#else
     383#include <string.h>
     384#define my_strndup(x,l) strndup((x),(l))
     385#endif
     386
     387#ifndef HAVE_STRDUP
    381388extern char     *my_strdup(const char *str);
     389#else
     390#include <string.h>
     391#define my_strdup(x) strdup(x)
     392#endif
    382393extern int      my_snprintf(char *buf, size_t buflen, const char *fmt, ...);
    383394
  • cpukit/shttpd/string.c

    re98fc44 ra81de3f  
    3333}
    3434
     35#ifndef HAVE_STRNDUP
    3536char *
    3637my_strndup(const char *ptr, size_t len)
     
    4445
    4546}
     47#endif
    4648
     49#ifndef HAVE_STRDUP
    4750char *
    4851my_strdup(const char *str)
     
    5053        return (my_strndup(str, strlen(str)));
    5154}
     55#endif
    5256
    5357/*
Note: See TracChangeset for help on using the changeset viewer.