UNIX2003.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //
  2. // UNIX2003.c
  3. // Redland-ObjC
  4. //
  5. // Created by Marcus Rohrmoser on 18.05.14.
  6. // Copyright (c) 2014 Marcus Rohrmoser mobile Software. All rights reserved.
  7. //
  8. #include <dirent.h>
  9. #include <stdio.h>
  10. #include <time.h>
  11. #include <regex.h>
  12. #include <string.h>
  13. #include <stdlib.h>
  14. /** https://stackoverflow.com/questions/9575023/xcode-code-coverage-and-fopenunix2003
  15. */
  16. DIR *opendir$INODE64$UNIX2003(const char *dirname)
  17. {
  18. return opendir(dirname);
  19. }
  20. int fputs$UNIX2003(const char *__restrict s, FILE *__restrict stream)
  21. {
  22. return fputs(s, stream);
  23. }
  24. time_t mktime$UNIX2003(struct tm *timeptr)
  25. {
  26. return mktime(timeptr);
  27. }
  28. int regcomp$UNIX2003(regex_t *restrict preg, const char *restrict pattern, int cflags)
  29. {
  30. return regcomp(preg, pattern, cflags);
  31. }
  32. char *strerror$UNIX2003(int i)
  33. {
  34. return strerror(i);
  35. }
  36. size_t strftime$UNIX2003(char *restrict s, size_t maxsize, const char *restrict format, const struct tm *restrict timeptr)
  37. {
  38. return strftime(s, maxsize, format, timeptr);
  39. }
  40. double strtod$UNIX2003(const char *restrict nptr, char **restrict endptr)
  41. {
  42. return strtod(nptr, endptr);
  43. }
  44. // void rewinddir$INODE64$UNIX2003(DIR *dir) { rewinddir(dir); }