xref: /freebsd/contrib/ofed/libibverbs/arch.h (revision c697fb7f)
1 /*
2  * This software is available to you under a choice of one of two
3  * licenses.  You may choose to be licensed under the terms of the GNU
4  * General Public License (GPL) Version 2, available from the file
5  * COPYING in the main directory of this source tree, or the
6  * OpenIB.org BSD license below:
7  *
8  *     Redistribution and use in source and binary forms, with or
9  *     without modification, are permitted provided that the following
10  *     conditions are met:
11  *
12  *      - Redistributions of source code must retain the above
13  *        copyright notice, this list of conditions and the following
14  *        disclaimer.
15  *
16  *      - Redistributions in binary form must reproduce the above
17  *        copyright notice, this list of conditions and the following
18  *        disclaimer in the documentation and/or other materials
19  *        provided with the distribution.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
24  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
25  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
26  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28  * SOFTWARE.
29  */
30 
31 #ifndef INFINIBAND_ARCH_H
32 #define INFINIBAND_ARCH_H
33 
34 #include <stdint.h>
35 #include <infiniband/endian.h>
36 
37 #warning "This header is obsolete."
38 
39 #ifndef ntohll
40 #undef htonll
41 #undef ntohll
42 /* Users should use the glibc functions directly, not these wrappers */
43 static inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); }
44 static inline __attribute__((deprecated)) uint64_t ntohll(uint64_t x) { return be64toh(x); }
45 #define htonll htonll
46 #define ntohll ntohll
47 #endif
48 
49 /* Barrier macros are no longer provided by libibverbs */
50 
51 #endif /* INFINIBAND_ARCH_H */
52