mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-01 14:55:12 +00:00
Define WORDS_BIGENDIAN on big endian systems.
Instead of a configure check, we use endian.h (or a fallback).
This commit is contained in:
@@ -49,9 +49,22 @@
|
|||||||
|
|
||||||
#include <stdlib.h> /* for malloc, free */
|
#include <stdlib.h> /* for malloc, free */
|
||||||
#include <string.h> /* for strcmp, strlen, memcpy, memmove, memset */
|
#include <string.h> /* for strcmp, strlen, memcpy, memmove, memset */
|
||||||
|
#if defined(HAVE_ENDIAN_H)
|
||||||
|
# include <endian.h>
|
||||||
|
#elif defined(HAVE_SYS_ENDIAN_H)
|
||||||
|
# include <sys/endian.h>
|
||||||
|
#elif defined(HAVE_MACHINE_ENDIAN_H)
|
||||||
|
# include <machine/endian.h>
|
||||||
|
#else
|
||||||
|
# include "compat/endian.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "protobuf-c/protobuf-c.h"
|
#include "protobuf-c/protobuf-c.h"
|
||||||
|
|
||||||
|
#if BYTE_ORDER == BIG_ENDIAN
|
||||||
|
# define WORDS_BIGENDIAN
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#define FALSE 0
|
#define FALSE 0
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user