libc.inc 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {
  2. This file is part of the Free Component Library (FCL)
  3. Copyright (c) 1999-2002 by the Free Pascal development team
  4. libc functions unit for Nintendo Wii
  5. Copyright (c) 2011 by Francesco Lombardi
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. *****************************************************************************}
  12. function __errno: plongint; cdecl; export;
  13. begin
  14. end;
  15. function S_ISBLK(m: longint): boolean; inline;
  16. begin
  17. result := (m and _IFMT) = _IFBLK;
  18. end;
  19. function S_ISCHR(m: longint): boolean; inline;
  20. begin
  21. result := (m and _IFMT) = _IFCHR;
  22. end;
  23. function S_ISDIR(m: longint): boolean; inline;
  24. begin
  25. result := (m and _IFMT) = _IFDIR;
  26. end;
  27. function S_ISFIFO(m: longint): boolean; inline;
  28. begin
  29. result := (m and _IFMT) = _IFIFO;
  30. end;
  31. function S_ISREG(m: longint): boolean; inline;
  32. begin
  33. result := (m and _IFMT) = _IFREG;
  34. end;
  35. function S_ISLNK(m: longint): boolean; inline;
  36. begin
  37. result := (m and _IFMT) = _IFLNK;
  38. end;
  39. function S_ISSOCK(m: longint): boolean; inline;
  40. begin
  41. result := (m and _IFMT) = _IFSOCK;
  42. end;