mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r24337: Make libreplace provide offsetof.
(This used to be commit 48d1aa4fcf
)
This commit is contained in:
parent
f3e1363281
commit
bc13766a76
@ -92,6 +92,7 @@ ZERO_STRUCTPN
|
|||||||
ZERO_ARRAY
|
ZERO_ARRAY
|
||||||
ARRAY_SIZE
|
ARRAY_SIZE
|
||||||
PTR_DIFF
|
PTR_DIFF
|
||||||
|
offsetof
|
||||||
|
|
||||||
Headers:
|
Headers:
|
||||||
stdint.h
|
stdint.h
|
||||||
|
@ -52,6 +52,10 @@
|
|||||||
#define QSORT_CAST (int (*)(const void *, const void *))
|
#define QSORT_CAST (int (*)(const void *, const void *))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef offsetof
|
||||||
|
#define offsetof(t,f) ((unsigned int)&((t *)0)->f)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_STDINT_H
|
#ifdef HAVE_STDINT_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
/* force off HAVE_INTTYPES_H so that roken doesn't try to include both,
|
/* force off HAVE_INTTYPES_H so that roken doesn't try to include both,
|
||||||
|
@ -37,10 +37,6 @@
|
|||||||
typedef uint32_t tdb_len_t;
|
typedef uint32_t tdb_len_t;
|
||||||
typedef uint32_t tdb_off_t;
|
typedef uint32_t tdb_off_t;
|
||||||
|
|
||||||
#ifndef offsetof
|
|
||||||
#define offsetof(t,f) ((unsigned int)&((t *)0)->f)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TDB_MAGIC_FOOD "TDB file\n"
|
#define TDB_MAGIC_FOOD "TDB file\n"
|
||||||
#define TDB_VERSION (0x26011967 + 6)
|
#define TDB_VERSION (0x26011967 + 6)
|
||||||
#define TDB_MAGIC (0x26011999U)
|
#define TDB_MAGIC (0x26011999U)
|
||||||
|
Loading…
Reference in New Issue
Block a user