Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/common/lib/libc/hash/sha2
On Thu, 11 Jun 2009, Joerg Sonnenberger wrote:
> Module Name: src
> Committed By: joerg
> Date: Thu Jun 11 22:40:42 UTC 2009
>
> Modified Files:
> src/common/lib/libc/hash/sha2: sha2.c
>
> Log Message:
> Provide fallback definitions of be[32|64]toh and htobe[32|64] for
> systems without sys/endian.h.
What's wrong with the fallback definitions in src/tools/compat_defs.h?
In other words, why is it not sufficient to do this:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
/* ... other includes here */
#if ! HAVE_NBTOOL_CONFIG_H
#include <sys/endian.h>
#endif
I think we should make src/tools/compat supply a fallback version of
sys/endian.h itself, in addition to the existing fallback definitions
of various macros that are expected to be defined in sys/endian.h.
With that change in src/tools/compat, I think you should need only the
following lines here:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
--apb (Alan Barrett)
Home |
Main Index |
Thread Index |
Old Index