arch.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #ifndef INFINIBAND_ARCH_H
  31. #define INFINIBAND_ARCH_H
  32. #include <stdint.h>
  33. #include <endian.h>
  34. #warning "This header is obsolete."
  35. #ifndef ntohll
  36. #undef htonll
  37. #undef ntohll
  38. /* Users should use the glibc functions directly, not these wrappers */
  39. static inline __attribute__((deprecated)) uint64_t htonll(uint64_t x) { return htobe64(x); }
  40. static inline __attribute__((deprecated)) uint64_t ntohll(uint64_t x) { return be64toh(x); }
  41. #define htonll htonll
  42. #define ntohll ntohll
  43. #endif
  44. /* Barrier macros are no longer provided by libibverbs */
  45. #endif /* INFINIBAND_ARCH_H */