LinuxStrings.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2014, Oculus VR, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. */
  10. #ifndef _GCC_WIN_STRINGS
  11. #define _GCC_WIN_STRINGS
  12. #if defined(__native_client__)
  13. #ifndef _stricmp
  14. int _stricmp(const char* s1, const char* s2);
  15. #endif
  16. int _strnicmp(const char* s1, const char* s2, size_t n);
  17. char *_strlwr(char * str );
  18. #define _vsnprintf vsnprintf
  19. #else
  20. #if (defined(__GNUC__) || defined(__GCCXML__) || defined(__S3E__) ) && !defined(_WIN32)
  21. #ifndef _stricmp
  22. int _stricmp(const char* s1, const char* s2);
  23. #endif
  24. int _strnicmp(const char* s1, const char* s2, size_t n);
  25. // http://www.jenkinssoftware.com/forum/index.php?topic=5010.msg20920#msg20920
  26. // #ifndef _vsnprintf
  27. #define _vsnprintf vsnprintf
  28. // #endif
  29. #ifndef __APPLE__
  30. char *_strlwr(char * str ); //this won't compile on OSX for some reason
  31. #endif
  32. #endif
  33. #endif
  34. #endif // _GCC_WIN_STRINGS
粤ICP备19079148号