cctools
cctools_endian.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2020- The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #ifndef CCTOOLS_ENDIAN_H
8 #define CCTOOLS_ENDIAN_H
9 
10 #include <stdint.h>
11 
12 
24 uint64_t cctools_htonll(uint64_t hostlonglong);
25 uint64_t cctools_ntohll(uint64_t netlonglong);
26 
27 /* Some platforms provide their own htonll/ntohll functions
28  * (or #define them to a byte swap function). We transparently
29  * modify the linker namespace to point to our implementation.
30  */
31 #undef htonll
32 #undef ntohll
33 #define htonll(x) cctools_htonll(x)
34 #define ntohll(x) cctools_htonll(x)
35 
36 #endif