t_openbsd.h2paschk 924 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # OpenBSD RTL-to-C structure compatibility checker description file
  2. #
  3. # Use
  4. # h2paschk t_openbsd.h2paschk
  5. #
  6. # ...to generate Pascal and C code, then make sure they both compile and that
  7. # the Pascal program produces the same output as the C program for each
  8. # supported architecture.
  9. @Pascal uses baseunix;
  10. @Pascal begin
  11. @C #include <sys/stat.h>
  12. @C #include <dirent.h>
  13. @C #include <poll.h>
  14. @C #include <stdio.h>
  15. @C #include <stddef.h>
  16. @C int main()
  17. @C {
  18. @record stat,struct stat
  19. .st_mode
  20. .st_dev
  21. .st_ino
  22. .st_nlink
  23. .st_uid
  24. .st_gid
  25. .st_rdev
  26. .st_atime
  27. .st_atimensec
  28. .st_mtime
  29. .st_mtimensec
  30. .st_ctime
  31. .st_ctimensec
  32. .st_size
  33. .st_blocks
  34. .st_blksize
  35. .st_flags
  36. .st_gen
  37. .st_birthtime,__st_birthtime
  38. .st_birthtimensec,__st_birthtimensec
  39. @record dirent,struct dirent
  40. .d_fileno
  41. .d_off
  42. .d_reclen
  43. .d_type
  44. .d_namlen
  45. .d_padding,__d_padding
  46. .d_name
  47. @record pollfd,struct pollfd
  48. .fd
  49. .events
  50. .revents
  51. @C return 0;
  52. @C }
  53. @Pascal end.