rdlar.h 856 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * rdlar.h - definitions of new RDOFF library/archive format.
  3. */
  4. #ifndef RDOFF_RDLAR_H
  5. #define RDOFF_RDLAR_H 1
  6. #include "compiler.h"
  7. /* For non-POSIX operating systems */
  8. #ifndef HAVE_GETUID
  9. # define getuid() 0
  10. #endif
  11. #ifndef HAVE_GETGID
  12. # define getgid() 0
  13. #endif
  14. #define RDLAMAG 0x414C4452 /* Archive magic */
  15. #define RDLMMAG 0x4D4C4452 /* Member magic */
  16. #define MAXMODNAMELEN 256 /* Maximum length of module name */
  17. struct rdlm_hdr {
  18. uint32_t magic; /* Must be RDLAMAG */
  19. uint32_t hdrsize; /* Header size + sizeof(module_name) */
  20. uint32_t date; /* Creation date */
  21. uint32_t owner; /* UID */
  22. uint32_t group; /* GID */
  23. uint32_t mode; /* File mode */
  24. uint32_t size; /* File size */
  25. /* NULL-terminated module name immediately follows */
  26. };
  27. #endif