diff options
author | Guo Mang <mang.guo@intel.com> | 2017-08-02 09:54:47 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-09-05 19:45:08 +0800 |
commit | 6c128c65b5ec0e5b8b5a0ccb165f3afd29e485f8 (patch) | |
tree | 444372d92a0ae8991fe4d15eb3937df43690dfda /StdLib/LibC/Main/HtoNtoH.c | |
parent | b207c6434d7a5a4502975d322312e07017e8a8cb (diff) | |
download | edk2-platforms-6c128c65b5ec0e5b8b5a0ccb165f3afd29e485f8.tar.xz |
Remove core packages since we can get them from edk2 repository
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'StdLib/LibC/Main/HtoNtoH.c')
-rw-r--r-- | StdLib/LibC/Main/HtoNtoH.c | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/StdLib/LibC/Main/HtoNtoH.c b/StdLib/LibC/Main/HtoNtoH.c deleted file mode 100644 index c501874b84..0000000000 --- a/StdLib/LibC/Main/HtoNtoH.c +++ /dev/null @@ -1,90 +0,0 @@ -/** @File
- Routines for translating between host and network byte-order.
-
- Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
- This program and the accompanying materials are licensed and made available
- under the terms and conditions of the BSD License that accompanies this
- distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-#include <Library/BaseLib.h>
-#include <LibConfig.h>
-#include <sys/endian.h>
-
-// Undefine macro versions of the functions to be defined below.
-#undef htonl
-#undef htons
-#undef ntohl
-#undef ntohs
-
-/** 32-bit Host to Network byte order conversion.
-
- @param[in] Datum The 32-bit value to be converted.
- @return Datum, converted to network byte order.
-**/
-uint32_t
-htonl(
- IN uint32_t Datum
- )
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
- return SwapBytes32(Datum);
-#else
- return Datum;
-#endif
-}
-
-/** 16-bit Host to Network byte order conversion.
-
- @param[in] Datum The 16-bit value to be converted.
- @return Datum, converted to network byte order.
-**/
-uint16_t
-htons(
- IN uint16_t Datum
- )
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
- return SwapBytes16(Datum);
-#else
- return Datum;
-#endif
-}
-
-/** 32-bit Network to Host byte order conversion.
-
- @param[in] Datum The 16-bit value to be converted.
- @return Datum, converted to host byte order.
-**/
-uint32_t
-ntohl(
- IN uint32_t Datum
- )
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
- return SwapBytes32(Datum);
-#else
- return Datum;
-#endif
-}
-
-/** 16-bit Network to Host byte order conversion.
-
- @param[in] Datum The 16-bit value to be converted.
- @return Datum, converted to host byte order.
-**/
-uint16_t
-ntohs(
- IN uint16_t Datum
- )
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
- return SwapBytes16(Datum);
-#else
- return Datum;
-#endif
-}
|