2002-12-04 22:01:01 +08:00
|
|
|
/*
|
|
|
|
* rdlar.h - definitions of new RDOFF library/archive format.
|
|
|
|
*/
|
|
|
|
|
2007-04-13 00:54:50 +08:00
|
|
|
#ifndef RDOFF_RDLAR_H
|
|
|
|
#define RDOFF_RDLAR_H 1
|
2002-12-04 22:01:01 +08:00
|
|
|
|
2007-04-13 00:54:50 +08:00
|
|
|
#include <inttypes.h>
|
2007-04-14 09:24:14 +08:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
2007-04-14 04:06:41 +08:00
|
|
|
#include "config.h"
|
2007-04-14 09:24:14 +08:00
|
|
|
#endif
|
2007-04-13 00:54:50 +08:00
|
|
|
|
|
|
|
/* For non-POSIX operating systems */
|
|
|
|
#ifndef HAVE_GETUID
|
|
|
|
# define getuid() 0
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_GETGID
|
|
|
|
# define getgid() 0
|
2002-12-04 22:01:01 +08:00
|
|
|
#endif
|
|
|
|
|
2005-01-16 06:15:51 +08:00
|
|
|
#define RDLAMAG 0x414C4452 /* Archive magic */
|
|
|
|
#define RDLMMAG 0x4D4C4452 /* Member magic */
|
2002-12-04 22:01:01 +08:00
|
|
|
|
2005-01-16 06:15:51 +08:00
|
|
|
#define MAXMODNAMELEN 256 /* Maximum length of module name */
|
2002-12-04 22:01:01 +08:00
|
|
|
|
|
|
|
struct rdlm_hdr {
|
2007-04-12 10:40:54 +08:00
|
|
|
uint32_t magic; /* Must be RDLAMAG */
|
|
|
|
uint32_t hdrsize; /* Header size + sizeof(module_name) */
|
|
|
|
uint32_t date; /* Creation date */
|
|
|
|
uint32_t owner; /* UID */
|
|
|
|
uint32_t group; /* GID */
|
|
|
|
uint32_t mode; /* File mode */
|
|
|
|
uint32_t size; /* File size */
|
2002-12-04 22:01:01 +08:00
|
|
|
/* NULL-terminated module name immediately follows */
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|