t_openbsd.h2paschk 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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/types.h>
  12. @C #include <sys/stat.h>
  13. @C #include <sys/time.h>
  14. @C #include <sys/times.h>
  15. @C #include <sys/resource.h>
  16. @C #include <sys/uio.h>
  17. @C #include <dirent.h>
  18. @C #include <poll.h>
  19. @C #include <utime.h>
  20. @C #include <fcntl.h>
  21. @C #include <unistd.h>
  22. @C #include <stdio.h>
  23. @C #include <stddef.h>
  24. @C int main()
  25. @C {
  26. @record stat,struct stat
  27. .st_mode
  28. .st_dev
  29. .st_ino
  30. .st_nlink
  31. .st_uid
  32. .st_gid
  33. .st_rdev
  34. .st_atime
  35. .st_atimensec
  36. .st_mtime
  37. .st_mtimensec
  38. .st_ctime
  39. .st_ctimensec
  40. .st_size
  41. .st_blocks
  42. .st_blksize
  43. .st_flags
  44. .st_gen
  45. .st_birthtime,__st_birthtime
  46. .st_birthtimensec,__st_birthtimensec
  47. @record dirent,struct dirent
  48. .d_fileno
  49. .d_off
  50. .d_reclen
  51. .d_type
  52. .d_namlen
  53. .d_padding,__d_padding
  54. .d_name
  55. @record pollfd,struct pollfd
  56. .fd
  57. .events
  58. .revents
  59. @record utimbuf,struct utimbuf
  60. .actime
  61. .modtime
  62. @record flock,struct flock
  63. .l_start
  64. .l_len
  65. .l_pid
  66. .l_type
  67. .l_whence
  68. @record tms,struct tms
  69. .tms_utime
  70. .tms_stime
  71. .tms_cutime
  72. .tms_cstime
  73. @record timezone,struct timezone
  74. .tz_minuteswest
  75. .tz_dsttime
  76. @record rusage,struct rusage
  77. .ru_utime
  78. .ru_stime
  79. .ru_maxrss
  80. .ru_ixrss
  81. .ru_idrss
  82. .ru_isrss
  83. .ru_minflt
  84. .ru_majflt
  85. .ru_nswap
  86. .ru_inblock
  87. .ru_oublock
  88. .ru_msgsnd
  89. .ru_msgrcv
  90. .ru_nsignals
  91. .ru_nvcsw
  92. .ru_nivcsw
  93. @record TRLimit,struct rlimit
  94. .rlim_cur
  95. .rlim_max
  96. @record iovec,struct iovec
  97. .iov_base
  98. .iov_len
  99. @C return 0;
  100. @C }
  101. @Pascal end.