Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. /*      Copyright (C) 2005 Garrett A. Kajmowicz
  2.  
  3.         This file is part of the uClibc++ Library.
  4.         This library is free software; you can redistribute it and/or
  5.         modify it under the terms of the GNU Lesser General Public
  6.         License as published by the Free Software Foundation; either
  7.         version 2.1 of the License, or (at your option) any later version.
  8.  
  9.         This library is distributed in the hope that it will be useful,
  10.         but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.         Lesser General Public License for more details.
  13.  
  14.         You should have received a copy of the GNU Lesser General Public
  15.         License along with this library; if not, write to the Free Software
  16.         Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  17. */
  18.  
  19. #include <cstddef>
  20. #include <string.h>
  21.  
  22. #ifndef __HEADER_CSTRING
  23. #define __HEADER_CSTRING 1
  24.  
  25.  
  26. namespace std{
  27.  
  28.         using ::memchr;
  29.         using ::memcmp;
  30.         using ::memcpy;
  31.         using ::memmove;
  32.         using ::memset;
  33.         using ::strcat;
  34.         using ::strchr;
  35.         using ::strcmp;
  36.         using ::strcoll;
  37.         using ::strcpy;
  38.         using ::strcspn;
  39.         using ::strerror;
  40.         using ::strlen;
  41.         using ::strncat;
  42.         using ::strncmp;
  43.         using ::strncpy;
  44.         using ::strpbrk;
  45.         using ::strrchr;
  46.         using ::strspn;
  47.         using ::strstr;
  48.         using ::strtok;
  49.         using ::strxfrm;
  50.  
  51. #ifndef __CORRECT_ISO_CPP_STRING_H_PROTO
  52.         //Extra definitions required in c++ spec
  53.  
  54.         inline void* memchr(void* s, int c, size_t n){
  55.                 return memchr(const_cast<const void *>(s), c, n);
  56.         }
  57.  
  58.         inline char* strchr(char* s, int c){
  59.                 return strchr(const_cast<const char *>(s), c);
  60.         }
  61.  
  62.         inline char* strpbrk(char* s1, const char* s2){
  63.                 return strpbrk(const_cast<const char *>(s1), s2);
  64.         }
  65.  
  66.         inline char* strrchr(char* s, int c){
  67.                 return strrchr(const_cast<const char *>(s), c);
  68.         }
  69.  
  70.         inline char* strstr(char* s1, const char* s2){
  71.                 return strstr(const_cast<const char *>(s1), s2);
  72.         }
  73. #endif
  74. }
  75.  
  76. #endif
  77.  
  78.