summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Mang <mang.guo@intel.com>2016-12-22 18:27:39 +0800
committerGuo Mang <mang.guo@intel.com>2016-12-26 19:15:01 +0800
commit538644a2176b8e69000833e3add136bd86ff260a (patch)
treec1a4ab50f9063b751b89d2240fe4e2328f6e7bc7
parent28220db3c5759facf5e0a6891e53a6f268a0ebbc (diff)
downloadedk2-platforms-538644a2176b8e69000833e3add136bd86ff260a.tar.xz
StdLibPrivateInternalFiles: Remove unused Package
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Guo Mang <mang.guo@intel.com>
-rw-r--r--StdLibPrivateInternalFiles/Contributions.txt218
-rw-r--r--StdLibPrivateInternalFiles/DoNotUse.dec39
-rw-r--r--StdLibPrivateInternalFiles/Include/Arm/arith.h9
-rw-r--r--StdLibPrivateInternalFiles/Include/Arm/gd_qnan.h12
-rw-r--r--StdLibPrivateInternalFiles/Include/Device/Console.h53
-rw-r--r--StdLibPrivateInternalFiles/Include/Device/Device.h216
-rw-r--r--StdLibPrivateInternalFiles/Include/Device/IIO.h81
-rw-r--r--StdLibPrivateInternalFiles/Include/Efi/SysEfi.h37
-rw-r--r--StdLibPrivateInternalFiles/Include/Ia32/arith.h3
-rw-r--r--StdLibPrivateInternalFiles/Include/Ia32/gd_qnan.h11
-rw-r--r--StdLibPrivateInternalFiles/Include/Ipf/arith.h6
-rw-r--r--StdLibPrivateInternalFiles/Include/Ipf/gd_qnan.h5
-rw-r--r--StdLibPrivateInternalFiles/Include/LibConfig.h56
-rw-r--r--StdLibPrivateInternalFiles/Include/MainData.h97
-rw-r--r--StdLibPrivateInternalFiles/Include/X64/arith.h3
-rw-r--r--StdLibPrivateInternalFiles/Include/X64/gd_qnan.h11
-rw-r--r--StdLibPrivateInternalFiles/Include/extern.h89
-rw-r--r--StdLibPrivateInternalFiles/Include/kfile.h298
-rw-r--r--StdLibPrivateInternalFiles/Include/namespace.h779
-rw-r--r--StdLibPrivateInternalFiles/Include/reentrant.h268
-rw-r--r--StdLibPrivateInternalFiles/License.txt25
-rw-r--r--StdLibPrivateInternalFiles/ReadMe.txt502
22 files changed, 0 insertions, 2818 deletions
diff --git a/StdLibPrivateInternalFiles/Contributions.txt b/StdLibPrivateInternalFiles/Contributions.txt
deleted file mode 100644
index f87cbd73c6..0000000000
--- a/StdLibPrivateInternalFiles/Contributions.txt
+++ /dev/null
@@ -1,218 +0,0 @@
-
-======================
-= Code Contributions =
-======================
-
-To make a contribution to a TianoCore project, follow these steps.
-1. Create a change description in the format specified below to
- use in the source control commit log.
-2. Your commit message must include your "Signed-off-by" signature,
- and "Contributed-under" message.
-3. Your "Contributed-under" message explicitly states that the
- contribution is made under the terms of the specified
- contribution agreement. Your "Contributed-under" message
- must include the name of contribution agreement and version.
- For example: Contributed-under: TianoCore Contribution Agreement 1.0
- The "TianoCore Contribution Agreement" is included below in
- this document.
-4. Submit your code to the TianoCore project using the process
- that the project documents on its web page. If the process is
- not documented, then submit the code on development email list
- for the project.
-5. It is preferred that contributions are submitted using the same
- copyright license as the base project. When that is not possible,
- then contributions using the following licenses can be accepted:
- * BSD (2-clause): http://opensource.org/licenses/BSD-2-Clause
- * BSD (3-clause): http://opensource.org/licenses/BSD-3-Clause
- * MIT: http://opensource.org/licenses/MIT
- * Python-2.0: http://opensource.org/licenses/Python-2.0
- * Zlib: http://opensource.org/licenses/Zlib
-
- Contributions of code put into the public domain can also be
- accepted.
-
- Contributions using other licenses might be accepted, but further
- review will be required.
-
-=====================================================
-= Change Description / Commit Message / Patch Email =
-=====================================================
-
-Your change description should use the standard format for a
-commit message, and must include your "Signed-off-by" signature
-and the "Contributed-under" message.
-
-== Sample Change Description / Commit Message =
-
-=== Start of sample patch email message ===
-
-From: Contributor Name <contributor@example.com>
-Subject: [PATCH] CodeModule: Brief-single-line-summary
-
-Full-commit-message
-
-Contributed-under: TianoCore Contribution Agreement 1.0
-Signed-off-by: Contributor Name <contributor@example.com>
----
-
-An extra message for the patch email which will not be considered part
-of the commit message can be added here.
-
-Patch content inline or attached
-
-=== End of sample patch email message ===
-
-=== Notes for sample patch email ===
-
-* The first line of commit message is taken from the email's subject
- line following [PATCH]. The remaining portion of the commit message
- is the email's content until the '---' line.
-* git format-patch is one way to create this format
-
-=== Definitions for sample patch email ===
-
-* "CodeModule" is a short idenfier for the affected code. For
- example MdePkg, or MdeModulePkg UsbBusDxe.
-* "Brief-single-line-summary" is a short summary of the change.
-* The entire first line should be less than ~70 characters.
-* "Full-commit-message" a verbose multiple line comment describing
- the change. Each line should be less than ~70 characters.
-* "Contributed-under" explicitely states that the contribution is
- made under the terms of the contribtion agreement. This
- agreement is included below in this document.
-* "Signed-off-by" is the contributor's signature identifying them
- by their real/legal name and their email address.
-
-========================================
-= TianoCore Contribution Agreement 1.0 =
-========================================
-
-INTEL CORPORATION ("INTEL") MAKES AVAILABLE SOFTWARE, DOCUMENTATION,
-INFORMATION AND/OR OTHER MATERIALS FOR USE IN THE TIANOCORE OPEN SOURCE
-PROJECT (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE
-TERMS AND CONDITIONS OF THIS AGREEMENT BETWEEN YOU AND INTEL AND/OR THE
-TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR
-REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE
-CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS
-OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED
-BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS
-AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE
-AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT
-USE THE CONTENT.
-
-Unless otherwise indicated, all Content made available on the TianoCore
-site is provided to you under the terms and conditions of the BSD
-License ("BSD"). A copy of the BSD License is available at
-http://opensource.org/licenses/bsd-license.php
-or when applicable, in the associated License.txt file.
-
-Certain other content may be made available under other licenses as
-indicated in or with such Content. (For example, in a License.txt file.)
-
-You accept and agree to the following terms and conditions for Your
-present and future Contributions submitted to TianoCore site. Except
-for the license granted to Intel hereunder, You reserve all right,
-title, and interest in and to Your Contributions.
-
-== SECTION 1: Definitions ==
-* "You" or "Contributor" shall mean the copyright owner or legal
- entity authorized by the copyright owner that is making a
- Contribution hereunder. All other entities that control, are
- controlled by, or are under common control with that entity are
- considered to be a single Contributor. For the purposes of this
- definition, "control" means (i) the power, direct or indirect, to
- cause the direction or management of such entity, whether by
- contract or otherwise, or (ii) ownership of fifty percent (50%)
- or more of the outstanding shares, or (iii) beneficial ownership
- of such entity.
-* "Contribution" shall mean any original work of authorship,
- including any modifications or additions to an existing work,
- that is intentionally submitted by You to the TinaoCore site for
- inclusion in, or documentation of, any of the Content. For the
- purposes of this definition, "submitted" means any form of
- electronic, verbal, or written communication sent to the
- TianoCore site or its representatives, including but not limited
- to communication on electronic mailing lists, source code
- control systems, and issue tracking systems that are managed by,
- or on behalf of, the TianoCore site for the purpose of
- discussing and improving the Content, but excluding
- communication that is conspicuously marked or otherwise
- designated in writing by You as "Not a Contribution."
-
-== SECTION 2: License for Contributions ==
-* Contributor hereby agrees that redistribution and use of the
- Contribution in source and binary forms, with or without
- modification, are permitted provided that the following
- conditions are met:
-** Redistributions of source code must retain the Contributor's
- copyright notice, this list of conditions and the following
- disclaimer.
-** Redistributions in binary form must reproduce the Contributor's
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials provided
- with the distribution.
-* Disclaimer. None of the names of Contributor, Intel, or the names
- of their respective contributors may be used to endorse or
- promote products derived from this software without specific
- prior written permission.
-* Contributor grants a license (with the right to sublicense) under
- claims of Contributor's patents that Contributor can license that
- are infringed by the Contribution (as delivered by Contributor) to
- make, use, distribute, sell, offer for sale, and import the
- Contribution and derivative works thereof solely to the minimum
- extent necessary for licensee to exercise the granted copyright
- license; this patent license applies solely to those portions of
- the Contribution that are unmodified. No hardware per se is
- licensed.
-* EXCEPT AS EXPRESSLY SET FORTH IN SECTION 3 BELOW, THE
- CONTRIBUTION IS PROVIDED BY THE CONTRIBUTOR "AS IS" AND ANY
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE
- CONTRIBUTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- DAMAGE.
-
-== SECTION 3: Representations ==
-* You represent that You are legally entitled to grant the above
- license. If your employer(s) has rights to intellectual property
- that You create that includes Your Contributions, You represent
- that You have received permission to make Contributions on behalf
- of that employer, that Your employer has waived such rights for
- Your Contributions.
-* You represent that each of Your Contributions is Your original
- creation (see Section 4 for submissions on behalf of others).
- You represent that Your Contribution submissions include complete
- details of any third-party license or other restriction
- (including, but not limited to, related patents and trademarks)
- of which You are personally aware and which are associated with
- any part of Your Contributions.
-
-== SECTION 4: Third Party Contributions ==
-* Should You wish to submit work that is not Your original creation,
- You may submit it to TianoCore site separately from any
- Contribution, identifying the complete details of its source
- and of any license or other restriction (including, but not
- limited to, related patents, trademarks, and license agreements)
- of which You are personally aware, and conspicuously marking the
- work as "Submitted on behalf of a third-party: [named here]".
-
-== SECTION 5: Miscellaneous ==
-* Applicable Laws. Any claims arising under or relating to this
- Agreement shall be governed by the internal substantive laws of
- the State of Delaware or federal courts located in Delaware,
- without regard to principles of conflict of laws.
-* Language. This Agreement is in the English language only, which
- language shall be controlling in all respects, and all versions
- of this Agreement in any other language shall be for accommodation
- only and shall not be binding. All communications and notices made
- or given pursuant to this Agreement, and all documentation and
- support to be provided, unless otherwise noted, shall be in the
- English language.
-
diff --git a/StdLibPrivateInternalFiles/DoNotUse.dec b/StdLibPrivateInternalFiles/DoNotUse.dec
deleted file mode 100644
index da6061b720..0000000000
--- a/StdLibPrivateInternalFiles/DoNotUse.dec
+++ /dev/null
@@ -1,39 +0,0 @@
-## @file
-#
-# Copyright (c) 2010 - 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 which 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.
-##
-
-
-[Defines]
- DEC_SPECIFICATION = 0x00010005
- PACKAGE_NAME = StdLibPrivateInternalFiles
- PACKAGE_GUID = 25e23884-dc26-42c3-bd27-40e99f7d866b
- PACKAGE_VERSION = 0.01
-
-
-[Includes]
- Include
-
-[Includes.IA32]
- Include/Ia32
-
-[Includes.X64]
- Include/X64
-
-[Includes.IPF]
- Include/Ipf
-
-[Includes.ARM]
- Include/Arm
-
-[Includes.AARCH64]
- # Use the ARM headers for now.
- Include/Arm
diff --git a/StdLibPrivateInternalFiles/Include/Arm/arith.h b/StdLibPrivateInternalFiles/Include/Arm/arith.h
deleted file mode 100644
index e759ec2ba9..0000000000
--- a/StdLibPrivateInternalFiles/Include/Arm/arith.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/* $NetBSD: arith.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */
-
-#include <machine/endian.h>
-
-#if BYTE_ORDER == BIG_ENDIAN
-#define IEEE_BIG_ENDIAN
-#else
-#define IEEE_LITTLE_ENDIAN
-#endif
diff --git a/StdLibPrivateInternalFiles/Include/Arm/gd_qnan.h b/StdLibPrivateInternalFiles/Include/Arm/gd_qnan.h
deleted file mode 100644
index 57c5affe1b..0000000000
--- a/StdLibPrivateInternalFiles/Include/Arm/gd_qnan.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* $NetBSD: gd_qnan.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */
-
-#include <machine/endian.h>
-
-#define f_QNAN 0x7fc00000
-#if BYTE_ORDER == BIG_ENDIAN
-#define d_QNAN0 0x7ff80000
-#define d_QNAN1 0x0
-#else
-#define d_QNAN0 0x0
-#define d_QNAN1 0x7ff80000
-#endif
diff --git a/StdLibPrivateInternalFiles/Include/Device/Console.h b/StdLibPrivateInternalFiles/Include/Device/Console.h
deleted file mode 100644
index dce2630218..0000000000
--- a/StdLibPrivateInternalFiles/Include/Device/Console.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/** @file
- Declarations and macros for the console abstraction.
-
- Copyright (c) 2010 - 2014, 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 which accompanies this
- distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- Depends on <kfile.h>, <Device/Device.h>, <Protocol/SimpleTextIn.h>, <Uefi/UefiBaseType.h>
-**/
-#ifndef _DEVICE_UEFI_CONSOLE_H
-#define _DEVICE_UEFI_CONSOLE_H
-
-#include <kfile.h>
-#include <Device/Device.h>
-
-/* The members Cookie through Abstraction, inclusive, are the same type and order
- for all instance structures.
-
- All instance structures must be a multiple of sizeof(UINTN) bytes long
-*/
-typedef struct {
- UINT32 Cookie; ///< Special value identifying this as a valid ConInstance
- UINT32 InstanceNum; ///< Which instance is this? Zero-based.
- EFI_HANDLE Dev; ///< Pointer to either Input or Output Protocol.
- DeviceNode *Parent; ///< Points to the parent Device Node.
- struct fileops Abstraction; ///< Pointers to functions implementing this device's abstraction.
- UINTN Reserved_1; // Ensure that next member starts on an 8-byte boundary
- UINT64 NumRead; ///< Number of characters Read.
- UINT64 NumWritten; ///< Number of characters Written.
- __mbstate_t CharState; ///< Character state for the byte stream passing through this device
- CHAR16 UnGetKey; ///< One-key pushback, for poll().
-} ConInstance;
-
-__BEGIN_DECLS
-
-int
-EFIAPI
-da_ConOpen(
- IN DeviceNode *DevNode,
- IN struct __filedes *filp,
- IN int DevInstance,
- IN CHAR16 *Path,
- IN CHAR16 *MPath
-);
-
-__END_DECLS
-
-#endif /* _DEVICE_UEFI_CONSOLE_H */
diff --git a/StdLibPrivateInternalFiles/Include/Device/Device.h b/StdLibPrivateInternalFiles/Include/Device/Device.h
deleted file mode 100644
index cf2053d8b3..0000000000
--- a/StdLibPrivateInternalFiles/Include/Device/Device.h
+++ /dev/null
@@ -1,216 +0,0 @@
-/** @file
- Device Abstraction Utility Routines
-
- 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 which accompanies this
- distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- Depends upon: <kfile.h>
-**/
-#ifndef __DEV_UTILITY_H__
-#define __DEV_UTILITY_H__
-
-#define CON_COOKIE 0x62416F49 ///< 'IoAb'
-
-typedef enum {
- PathAbsolute = 0,
- PathRelative,
- PathMapping,
- PathError
-} PATH_CLASS;
-
-typedef struct _Device_Node {
- LIST_ENTRY DevList; ///< List of registered device abstractions
- const CHAR16 *DevName;
- const GUID *DevProto;
- void *InstanceList; ///< Array of instances for this device
- FO_OPEN OpenFunc;
- UINT32 InstanceSize; ///< Size of each instance in the InstanceList
- UINT32 NumInstances; ///< Number of instances in InstanceList
- UINT32 OpModes; ///< Supported modes of operation
-} DeviceNode;
-
-__BEGIN_DECLS
-
-extern LIST_ENTRY daDeviceList; ///< List of registered devices.
-extern DeviceNode *daDefaultDevice; ///< Device to use if nothing else found
-extern DeviceNode *daRootDevice; ///< Device containing the root file system
-extern DeviceNode *daCurrentDevice; ///< Device currently being accessed
-
-/** Add a new device to the device list.
-
- @param DevName Name of the device to add.
- @param DevProto Pointer to the GUID identifying the protocol associated with this device.
- If DevProto is NULL, startup code will not try to find instances
- of this device.
- @param OpenFunc Pointer to the device's Open function.
- @param InstanceList Optional pointer to the device's initialized instance list.
- If InstanceList is NULL, the application startup code will
- scan for instances of the protocol identified by DevProto and
- populate the InstanceList in the order those protocols are found.
- @param NumInstance Number of instances in InstanceList.
- @param Modes Bit-mapped flags indicating operations (R, W, RW, ...) permitted to this device.
-
-**/
-DeviceNode * EFIAPI __DevRegister( const CHAR16 *DevName, GUID *DevProto, FO_OPEN OpenFunc,
- void *InstanceList, int NumInstance, UINT32 InstanceSize, UINT32 Modes);
-
-/** Find a DeviceNode matching DevName or DevProto, or both.
-
- If DevName is NULL, then the device name is not used in the search.
- If DevProto is NULL, then the protocol GUID is not used in the search.
- If both are NULL, then INVALID_PARAMETER is returned.
- If both DevName and DevProto are specified, then both must match.
- If both are specified but only one matches, then DEVICE_ERROR is returned.
-
- @param DevName Name of the Device Abstraction to find.
- @param DevProto GUID of the Protocol associated with the Device Abstraction.
- @param Node Pointer to the pointer to receive the found Device Node's address.
-
- @retval RETURN_SUCCESS The desired Device Node was found.
- @retval RETURN_INVALID_PARAMETER Both DevName and DevProto are NULL or Node is NULL.
- @retval RETURN_DEVICE_ERROR One, but not both, of DevNode and DevProto matched.
-**/
-EFI_STATUS EFIAPI __DevSearch( CHAR16 *DevName, GUID *DevProto, DeviceNode **Node);
-
-/** Identify the type of path pointed to by Path.
-
- Paths are classified based upon their initial character sequences.
- ^\\ Absolute Path
- ^\. Relative Path
- ^[^:\\]: Mapping Path
- .* Relative Path
-
- Mapping paths are broken into two parts at the ':'. The part to the left of the ':'
- is the Map Name, pointed to by Path, and the part to the right of the ':' is pointed
- to by NewPath.
-
- If Path was not a Mapping Path, then NewPath is set to Path.
-
- @param[in] Path Pointer to the path to be classified.
- @param[out] NewPath Pointer to the path portion of a mapping path.
-
- @retval PathAbsolute Path is an absolute path. NewPath points to the first '\'.
- @retval PathRelative Path is a relative path. NewPath = Path.
- @retval PathMapping Path is a mapping path. NewPath points to the ':'.
- @retval PathError Path is NULL.
-**/
-PATH_CLASS EFIAPI ClassifyPath(IN wchar_t *Path, OUT wchar_t **NewPath, int * const Length);
-
-/* Normalize a narrow-character path and produce a wide-character path
- that has forward slashes replaced with backslashes.
- Backslashes are directory separators in UEFI File Paths.
-
- It is the caller's responsibility to eventually free() the returned buffer.
-
- @param[in] path A pointer to the narrow-character path to be normalized.
-
- @return A pointer to a buffer containing the normalized, wide-character, path.
-*/
-wchar_t *
-NormalizePath( const char *path);
-
-/** Process a MBCS path returning the final absolute path and the target device.
-
- @param path
- @param FullPath
- @param DevNode
-
- @retval RETURN_SUCCESS
- @retval RETURN_INVALID_PARAMETER
- @retval RETURN_NOT_FOUND
-**/
-RETURN_STATUS
-EFIAPI
-ParsePath( const char *path, wchar_t **FullPath, DeviceNode **DevNode, int *Which, wchar_t **MapPath);
-
-/** Process a wide character string representing a Mapping Path and extract the instance number.
-
- The instance number is the sequence of decimal digits immediately to the left
- of the ":" in the Map Name portion of a Mapping Path.
-
- This function is called with a pointer to beginning of the Map Name.
- Thus Path[Length] must be a ':' and Path[Length - 1] must be a decimal digit.
- If either of these are not true, an instance value of 0 is returned.
-
- If Path is NULL, an instance value of 0 is returned.
-
- @param[in] Path Points to the beginning of a Mapping Path
- @param[in] Length Number of valid characters to the left of the ':'
-
- @return Returns either 0 or the value of the contiguous digits to the left of the ':'.
-**/
-int
-EFIAPI
-PathInstance( const wchar_t *Path, int length);
-
-/** Transform a relative path into an absolute path.
-
- If Path is NULL, return NULL.
- Otherwise, pre-pend the CWD to Path then process the resulting path to:
- - Replace "/./" with "/"
- - Replace "/<dirname>/../" with "/"
- - Do not allow one to back up past the root, "/"
-
- Also sets the Current Working Device to the Root Device.
-
- Path must be a previously allocated buffer. PathAdjust will
- allocate a new buffer to hold the results of the transformation
- then free Path. A pointer to the newly allocated buffer is returned.
-
- @param[in] Path A pointer to the path to be transformed. This buffer
- will always be freed.
-
- @return A pointer to a buffer containing the transformed path.
-**/
-wchar_t *
-EFIAPI
-PathAdjust(wchar_t *Path);
-
-/** Replace the leading portion of Path with any aliases.
-
- Aliases are read from /etc/fstab. If there is an associated device, the
- Current Working Device is set to that device.
-
- Path must be a previously allocated buffer. PathAlias will
- allocate a new buffer to hold the results of the transformation
- then free Path. A pointer to the newly allocated buffer is returned.
-
- @param[in] Path A pointer to the original, unaliased, path. This
- buffer is always freed.
- @param[out] Node Filled in with a pointer to the Device Node describing
- the device abstraction associated with this path.
-
- @return A pointer to a buffer containing the aliased path.
-**/
-wchar_t *
-EFIAPI
-PathAlias(wchar_t *Path, DeviceNode **Node);
-
-/**
- Parses a normalized wide character path and returns a pointer to the entry
- following the last \. If a \ is not found in the path the return value will
- be the same as the input value. All error conditions return NULL.
-
- The behavior when passing in a path that has not been normalized is undefined.
-
- @param Path - A pointer to a wide character string containing a path to a
- directory or a file.
-
- @return Pointer to the file name or terminal directory. NULL if an error is
- detected.
-**/
-wchar_t *
-EFIAPI
-GetFileNameFromPath(
- const wchar_t *Path
- );
-
-__END_DECLS
-
-#endif /* __DEV_UTILITY_H__ */
diff --git a/StdLibPrivateInternalFiles/Include/Device/IIO.h b/StdLibPrivateInternalFiles/Include/Device/IIO.h
deleted file mode 100644
index 4eb3623cdc..0000000000
--- a/StdLibPrivateInternalFiles/Include/Device/IIO.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/** @file
- Constants and declarations for the Interactive IO library.
-
- Copyright (c) 2012, 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 which accompanies this
- distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-**/
-#ifndef _INTERACTIVE_IO_H
-#define _INTERACTIVE_IO_H
-
-#include <sys/EfiSysCall.h>
-#include <sys/termios.h>
-#include <Containers/Fifo.h>
-#include <kfile.h>
-
-__BEGIN_DECLS
-
-typedef struct _IIO_Instance cIIO;
-
-cIIO * EFIAPI New_cIIO(void); // Creates a new cIIO structure
-
-/* Types of Member functions of the TTY I/O "class". */
-typedef void (EFIAPI *cIIO_Delete) (cIIO *This);
-
-typedef ssize_t (EFIAPI *cIIO_Read) (struct __filedes *filp, size_t BufferSize, VOID *Buffer);
-
-typedef ssize_t (EFIAPI *cIIO_Write) (struct __filedes *filp, const char *buf, ssize_t n);
-
-typedef ssize_t (EFIAPI *cIIO_Echo) (struct __filedes *filp, wchar_t EChar, BOOLEAN EchoIsOK);
-
-/** Structure defining an instance of the Interactive I/O "class". **/
-struct _IIO_Instance {
- /* ######## Public Functions ######## */
- cIIO_Delete Delete;
- cIIO_Read Read;
- cIIO_Write Write;
- cIIO_Echo Echo;
-
- /* ######## PRIVATE Data ######## */
-
- // Wide input buffer -- stdin
- cFIFO *InBuf;
-
- // Wide output buffer -- stdout
- cFIFO *OutBuf;
-
- // Attributes for characters in the output buffer
- UINT8 *AttrBuf;
-
- // Wide output buffer -- stderr
- cFIFO *ErrBuf;
-
- // Character conversion states for the buffers
- mbstate_t OutState;
- mbstate_t ErrState;
-
- // Cursor position at beginning of operation
- // and at each character thereafter.
- CURSOR_XY InitialXY;
- CURSOR_XY CurrentXY;
-
- UINTN MaxColumn; // Width of the output device
- UINTN MaxRow; // Height of the output device
-
- // termios structure
- struct termios Termio;
-};
-
-// Helper Functions
-ssize_t IIO_CanonRead (struct __filedes *filp);
-ssize_t IIO_NonCanonRead (struct __filedes *filp);
-ssize_t IIO_WriteOne (struct __filedes *filp, cFIFO *Buf, wchar_t InCh);
-ssize_t IIO_EchoOne (struct __filedes *filp, wchar_t InCh, BOOLEAN EchoIsOK);
-
-__END_DECLS
-#endif /* _INTERACTIVE_IO_H */
diff --git a/StdLibPrivateInternalFiles/Include/Efi/SysEfi.h b/StdLibPrivateInternalFiles/Include/Efi/SysEfi.h
deleted file mode 100644
index fa9dc38cdd..0000000000
--- a/StdLibPrivateInternalFiles/Include/Efi/SysEfi.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/** @file
- Declarations local to the Uefi SysCalls module of the Standard C Library.
-
- Copyright (c) 2010, 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.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
-**/
-#ifndef _SYSEFI_H
-#define _SYSEFI_H
-#include <Protocol/SimpleFileSystem.h>
-
-#define EFI_FILE_MODE_MASK ( EFI_FILE_MODE_READ | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_CREATE )
-#define OMODE_MASK 0xFFFF00UL
-#define OMODE_SHIFT 8
-
-#define S_ACC_READ ( S_IRUSR | S_IRGRP | S_IROTH | S_IXUSR | S_IXGRP | S_IXOTH )
-#define S_ACC_WRITE ( S_IWUSR | S_IWGRP | S_IWOTH )
-#define S_ACC_MASK ( S_IRWXU | S_IRWXG | S_IRWXO )
-
-UINT64
-Oflags2EFI( int oflags);
-
-UINT64
-Omode2EFI( int mode);
-
-/* Converts the first several EFI status values into the appropriate errno value.
-*/
-int
-EFI2errno( RETURN_STATUS Status);
-
-#endif /* _SYSEFI_H */
diff --git a/StdLibPrivateInternalFiles/Include/Ia32/arith.h b/StdLibPrivateInternalFiles/Include/Ia32/arith.h
deleted file mode 100644
index 2861c74a41..0000000000
--- a/StdLibPrivateInternalFiles/Include/Ia32/arith.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $NetBSD: arith.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */
-
-#define IEEE_LITTLE_ENDIAN
diff --git a/StdLibPrivateInternalFiles/Include/Ia32/gd_qnan.h b/StdLibPrivateInternalFiles/Include/Ia32/gd_qnan.h
deleted file mode 100644
index 512431d7eb..0000000000
--- a/StdLibPrivateInternalFiles/Include/Ia32/gd_qnan.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* $NetBSD: gd_qnan.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */
-
-#define f_QNAN 0x7fc00000
-#define d_QNAN0 0x0
-#define d_QNAN1 0x7ff80000
-#define ldus_QNAN0 0x0
-#define ldus_QNAN1 0x0
-#define ldus_QNAN2 0x0
-#define ldus_QNAN3 0x4000
-#define ldus_QNAN4 0x7fff
-/* 2 bytes of tail padding follow, per i386 ABI */
diff --git a/StdLibPrivateInternalFiles/Include/Ipf/arith.h b/StdLibPrivateInternalFiles/Include/Ipf/arith.h
deleted file mode 100644
index 2c07ea28e2..0000000000
--- a/StdLibPrivateInternalFiles/Include/Ipf/arith.h
+++ /dev/null
@@ -1,6 +0,0 @@
-/* $NetBSD: arith.h,v 1.1 2006/09/10 21:22:33 cherry Exp $ */
-
-#define IEEE_LITTLE_ENDIAN
-#ifndef _IEEE_FP
-#define Sudden_Underflow
-#endif
diff --git a/StdLibPrivateInternalFiles/Include/Ipf/gd_qnan.h b/StdLibPrivateInternalFiles/Include/Ipf/gd_qnan.h
deleted file mode 100644
index c46820499a..0000000000
--- a/StdLibPrivateInternalFiles/Include/Ipf/gd_qnan.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* $NetBSD: gd_qnan.h,v 1.1 2006/09/10 21:22:33 cherry Exp $ */
-
-#define f_QNAN 0x7fc00000
-#define d_QNAN0 0x0
-#define d_QNAN1 0x7ff80000
diff --git a/StdLibPrivateInternalFiles/Include/LibConfig.h b/StdLibPrivateInternalFiles/Include/LibConfig.h
deleted file mode 100644
index c0299b312c..0000000000
--- a/StdLibPrivateInternalFiles/Include/LibConfig.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/** @file
- Global Configuration macros for configuring how LibC is built.
-
- This file must be included at the beginning of every C file in the
- library, and before any of the Standard C header files are included.
-
- The configuration, as distributed in this file, is the only configuration
- these libraries have been tested with. Changing this configuration may
- produce code that will not build or may not run. Change at your own risk.
-
- Copyright (c) 2010 - 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.
-**/
-
-#define _LIBC 1
-#define NLS 1
-#define NO_FENV_H 1
-#define NO_HEX_FP 1
-#define No_Hex_NaN 1
-#define ALL_STATE 1
-#define USG_COMPAT 1
-#define _IEEE_LIBM 1
-
-#undef WITH_RUNE
-
-#if defined(__GNUC__)
- #define REAL_LONG_DOUBLE_SUPPORT 1
-#endif
-
-/* Define these if the associated file exists. */
-//#define HAVE_NBTOOL_CONFIG_H
-
-
-/* Define these macros in order to enable the associated functions. */
-#define HAVE_BASENAME
-#define HAVE_FFS
-#define HAVE_GETTIMEOFDAY
-#define HAVE_DIRNAME
-#define HAVE_SETPROGNAME 1
-
-
-/* Define these if StdLib provides the functionality as opposed to a "compatibility" library */
-//#define HAVE_GETOPT
-//#define HAVE_STRLCPY
-//#define HAVE_STRLCAT
-#define HAVE_MKSTEMP
-#define HAVE_SNPRINTF
-#define HAVE_VSNPRINTF
-
-//#define USE_8BIT_CHARS
diff --git a/StdLibPrivateInternalFiles/Include/MainData.h b/StdLibPrivateInternalFiles/Include/MainData.h
deleted file mode 100644
index fcb28e3255..0000000000
--- a/StdLibPrivateInternalFiles/Include/MainData.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/** @file
- Global data for the program environment.
-
- Copyright (c) 2010 - 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 which accompanies this
- distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- 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 <Uefi.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <limits.h>
-#include <signal.h>
-#include <time.h>
-#include <setjmp.h>
-
-#include <kfile.h>
-#include <Device/Device.h>
-
-#include "Device/Console.h"
-
-/* ################## Type Declarations ################################# */
-
-/** The type of an atexit handler function. **/
-typedef void __xithandler_t(void);
-
-/* ################## Global Declarations ############################### */
-#ifndef TYPE_BIT
-#define TYPE_BIT(type) (sizeof (type) * CHAR_BIT)
-#endif /* !defined TYPE_BIT */
-
-#ifndef TYPE_SIGNED
-#define TYPE_SIGNED(type) (((type) -1) < 0)
-#endif /* !defined TYPE_SIGNED */
-
-#ifndef INT_STRLEN_MAXIMUM
-/*
-** 302 / 1000 is log10(2.0) rounded up.
-** Subtract one for the sign bit if the type is signed;
-** add one for integer division truncation;
-** add one more for a minus sign if the type is signed.
-*/
-#define INT_STRLEN_MAXIMUM(type) \
-((TYPE_BIT(type) - TYPE_SIGNED(type)) * 302 / 1000 + 1 + TYPE_SIGNED(type))
-#endif /* !defined INT_STRLEN_MAXIMUM */
-
-/*
-** Big enough for something such as
-** ??? ???-2147483648 -2147483648:-2147483648:-2147483648 -2147483648\n
-** (two three-character abbreviations, five strings denoting integers,
-** three explicit spaces, two explicit colons, a newline,
-** and a trailing ASCII nul).
-*/
-#define ASCTIME_BUFLEN ((2 * 3) + (5 * INT_STRLEN_MAXIMUM(int)) + 3 + 2 + 1 + 1)
-
-struct __filedes; /* Forward Reference */
-struct stat; /* Forward Reference so I don't have to include <stat.h> */
-
-struct __MainData {
- // File descriptors
- struct __filedes fdarray[OPEN_MAX];
- // Low-level File abstractions for the stdin, stdout, stderr streams
- ConInstance *StdIo[3];
-
- // Signal Handlers
- __sighandler_t *sigarray[SIG_LAST]; // Pointers to signal handlers
-
- char *NArgV[ARGC_MAX]; // Narrow character argv array
- char *NCmdLine; // Narrow character version of command line arguments.
-
- void (*cleanup)(void); // Stdio Cleanup Function Pointer
-
- __xithandler_t *atexit_handler[ATEXIT_MAX]; // Array of handlers for atexit.
- clock_t AppStartTime; // Set in Main.c and used for time.h
- clock_t ClocksPerSecond; // Set in Main.c and used for time.h
- int num_atexit; ///< Number of registered atexit handlers.
-
- CHAR16 UString[UNICODE_STRING_MAX];
- CHAR16 UString2[UNICODE_STRING_MAX];
- struct tm BDTime; // Broken-down time structure for localtime.
- EFI_TIME TimeBuffer; // Used by <time.h>mk
- char ASgetenv[ASCII_STRING_MAX]; // Only modified by getenv
- char ASasctime[ASCTIME_BUFLEN]; // Only modified by asctime
-
- jmp_buf MainExit; ///< Save environment used for implementing _Exit()
- int ExitValue; ///< Value being returned by _Exit()
-
- BOOLEAN aborting; // Ensures cleanup function only called once when aborting.
-};
-
-extern struct __MainData *gMD;
diff --git a/StdLibPrivateInternalFiles/Include/X64/arith.h b/StdLibPrivateInternalFiles/Include/X64/arith.h
deleted file mode 100644
index 2861c74a41..0000000000
--- a/StdLibPrivateInternalFiles/Include/X64/arith.h
+++ /dev/null
@@ -1,3 +0,0 @@
-/* $NetBSD: arith.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */
-
-#define IEEE_LITTLE_ENDIAN
diff --git a/StdLibPrivateInternalFiles/Include/X64/gd_qnan.h b/StdLibPrivateInternalFiles/Include/X64/gd_qnan.h
deleted file mode 100644
index 7bcfa242b0..0000000000
--- a/StdLibPrivateInternalFiles/Include/X64/gd_qnan.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* $NetBSD: gd_qnan.h,v 1.1 2006/01/25 15:33:28 kleink Exp $ */
-
-#define f_QNAN 0x7fc00000
-#define d_QNAN0 0x0
-#define d_QNAN1 0x7ff80000
-#define ldus_QNAN0 0x0
-#define ldus_QNAN1 0x0
-#define ldus_QNAN2 0x0
-#define ldus_QNAN3 0x4000
-#define ldus_QNAN4 0x7fff
-/* 6 bytes of tail padding follow, per AMD64 ABI */
diff --git a/StdLibPrivateInternalFiles/Include/extern.h b/StdLibPrivateInternalFiles/Include/extern.h
deleted file mode 100644
index cffb59559d..0000000000
--- a/StdLibPrivateInternalFiles/Include/extern.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* @file
- Misc. external declarations.
-
- Copyright (c) 2010 - 2012, 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.
-
- * Copyright (c) 1997 Christos Zoulas. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by Christos Zoulas.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- NetBSD: extern.h,v 1.14 2006/11/22 17:23:25 christos Exp
- */
-#include <Uefi.h>
-#include <time.h>
-
-__BEGIN_DECLS
-extern char * __minbrk;
-int __getcwd(char *, size_t);
-int __getlogin(char *, size_t);
-int __setlogin(const char *);
-void _resumecontext(void);
-const char * __strerror(int , char *, size_t);
-const char * __strsignal(int , char *, size_t);
-char * __dtoa(double, int, int, int *, int *, char **);
-void __freedtoa(char *);
-int __sysctl(const int *, unsigned int, void *, size_t *, const void *, size_t);
-
-#ifdef HAVE_SIGACTION
- struct sigaction;
- int __sigaction_sigtramp (int, const struct sigaction *,
- struct sigaction *, const void *, int);
-#endif /* HAVE_SIGACTION */
-
-#ifdef WIDE_DOUBLE
- char * __hdtoa(double, const char *, int, int *, int *, char **);
- char * __hldtoa(long double, const char *, int, int *, int *, char **);
- char * __ldtoa(long double *, int, int, int *, int *, char **);
-#endif
-
-#ifdef HAVE_SYSLOG
- struct syslog_data;
- void syslog_ss(int, struct syslog_data *, const char *, ...)
- __attribute__((__format__(__printf__,3,4)));
- void vsyslog_ss(int, struct syslog_data *, const char *, _BSD_VA_LIST_);
-#endif /* HAVE_SYSLOG */
-
-#ifdef HAVE_SNPRINTF_SS
- int snprintf_ss(char * __restrict, size_t, const char * __restrict, ...)
- __attribute__((__format__(__printf__, 3, 4)));
-#endif /* HAVE_SNPRINTF_SS */
-
-#ifdef HAVE_VSNPRINTF_SS
- int vsnprintf_ss(char * __restrict, size_t, const char * __restrict,
- _BSD_VA_LIST_) __attribute__((__format__(__printf__, 3, 0)));
-#endif /* HAVE_VSNPRINTF_SS */
-
-void Efi2Tm( EFI_TIME *ET, struct tm *BT);
-time_t Efi2Time( EFI_TIME *EfiBDtime);
-
-__END_DECLS
diff --git a/StdLibPrivateInternalFiles/Include/kfile.h b/StdLibPrivateInternalFiles/Include/kfile.h
deleted file mode 100644
index 6312895c40..0000000000
--- a/StdLibPrivateInternalFiles/Include/kfile.h
+++ /dev/null
@@ -1,298 +0,0 @@
-/** @file
- The EFI kernel's interpretation of a "file".
-
- Copyright (c) 2012, 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 which accompanies this
- distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
- * Copyright (c) 1982, 1986, 1989, 1993
- * The Regents of the University of California. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * file.h 8.3 (Berkeley) 1/9/95
- NetBSD: file.h,v 1.56 2006/05/14 21:38:18 elad Exp
-**/
-#ifndef _PIF_KFILE_H_
-#define _PIF_KFILE_H_
-
-#include <Uefi.h>
-#include <Protocol/SimpleTextOut.h>
-#include <Protocol/SimpleFileSystem.h>
-
-#include <wchar.h>
-#include <stdarg.h>
-#include <sys/fcntl.h>
-#include <sys/unistd.h>
-
-struct stat;
-struct fileops;
-struct _Device_Node;
-
-/* The number of "special" character stream devices.
- These include:
- stdin, stdout, stderr
-*/
-#define NUM_SPECIAL 3
-
-/* Organization of the f_iflags member of the __filedes structure. */
-#define DTYPE_MASK 0x00000007 ///< Device Type
-#define DTYPE_VNODE 1 /* file */
-#define DTYPE_SOCKET 2 /* communications endpoint */
-#define DTYPE_PIPE 3 /* pipe */
-#define DTYPE_KQUEUE 4 /* event queue */
-#define DTYPE_MISC 5 /* misc file descriptor type */
-#define DTYPE_CRYPTO 6 /* crypto */
-#define DTYPE_NAMES "0", "file", "socket", "pipe", "kqueue", "misc", "crypto"
-
-#define FIF_WANTCLOSE 0x10000000 /* a close is waiting for usecount */
-#define FIF_DELCLOSE 0x20000000 /* Delete on close. */
-#define FIF_LARVAL 0x80000000 /* not fully constructed; don't use */
-
-/*
- This structure must be a multiple of 8 bytes in length.
-*/
-struct __filedes {
- off_t f_offset; /* current position in file */
- const struct fileops *f_ops;
-
- /* The devdata member has different meanings depending upon whether
- a block oriented or character oriented device is being accessed.
- For block devices, devdata holds an EFI handle to the open file or directory.
- For character devices, devdata points to the device's IIO structure,
- if it has one. It may be NULL indicating a non-interactive character
- device.
- */
- void *devdata; /* Device-specific data */
- int Oflags; // From the open call, see fcntl.h
- int Omode; // From the open call
- int RefCount; // Reference count of opens
- UINT32 f_flag; /* see fcntl.h */
- UINT32 f_iflags; // In use if non-zero
- UINT16 MyFD; // Which FD this is.
- UINT16 Reserved_1; // Force this structure to be a multiple of 8-bytes in length
-};
-
-struct fileops {
- /* These functions must always be implemented. */
- int (EFIAPI *fo_close) (struct __filedes *filp);
- ssize_t (EFIAPI *fo_read) (struct __filedes *filp, off_t *Offset, size_t Len, void *Buf);
- ssize_t (EFIAPI *fo_write) (struct __filedes *filp, off_t *Offset, size_t Len, const void *Buf);
-
- /* Call the fnullop_* version of these functions if not implemented by the device. */
- int (EFIAPI *fo_fcntl) (struct __filedes *filp, UINT32 Cmd, void *p3, void *p4);
- short (EFIAPI *fo_poll) (struct __filedes *filp, short Events);
- int (EFIAPI *fo_flush) (struct __filedes *filp);
-
- /* Call the fbadop_* version of these functions if not implemented by the device. */
- int (EFIAPI *fo_stat) (struct __filedes *filp, struct stat *StatBuf, void *Buf);
- int (EFIAPI *fo_ioctl) (struct __filedes *filp, ULONGN Cmd, va_list argp);
- int (EFIAPI *fo_delete) (struct __filedes *filp);
- int (EFIAPI *fo_rmdir) (struct __filedes *filp);
- int (EFIAPI *fo_mkdir) (const char *path, __mode_t perms);
- int (EFIAPI *fo_rename) (const char *from, const char *to);
-
- /* Use a NULL if this function has not been implemented by the device. */
- off_t (EFIAPI *fo_lseek) (struct __filedes *filp, off_t, int);
-};
-
-/* A generic instance structure which is valid for
- for all device instance structures.
-
- All device instance structures MUST be a multiple of 8-bytes in length.
-*/
-typedef struct {
- UINT32 Cookie; ///< Special value identifying this as a valid Instance
- UINT32 InstanceNum; ///< Which instance is this? Zero-based.
- EFI_HANDLE Dev; ///< Pointer to either Input or Output Protocol.
- struct _Device_Node *Parent; ///< Points to the parent Device Node.
- struct fileops Abstraction; ///< Pointers to functions implementing this device's abstraction.
- UINTN Reserved_1; // Force this to always be a multiple of 8-bytes in length
-} GenericInstance;
-
-/* Type of all Device-specific handler's open routines. */
-typedef
- int (EFIAPI *FO_OPEN) (struct _Device_Node *This, struct __filedes *FD,
- int Instance, wchar_t *Path, wchar_t *MPath);
-
-#define FILE_IS_USABLE(fp) (((fp)->f_iflags & \
- (FIF_WANTCLOSE|FIF_LARVAL)) == 0)
-
-#define FILE_SET_MATURE(fp) \
-do { \
- (fp)->f_iflags &= ~FIF_LARVAL; \
-} while (/*CONSTCOND*/0)
-
-/*
- * Flags for fo_read and fo_write.
- */
-#define FOF_UPDATE_OFFSET 0x01 /* update the file offset */
-
-__BEGIN_DECLS
-
-int fdcreate (CHAR16 *, UINT32, UINT32, BOOLEAN, VOID *, const struct fileops *);
-
-/* Commonly used fileops
- fnullop_* Does nothing and returns success.
- fbadop_* Does nothing and returns EPERM
-*/
-int EFIAPI fnullop_fcntl (struct __filedes *filp, UINT32 Cmd, void *p3, void *p4);
-short EFIAPI fnullop_poll (struct __filedes *filp, short Events);
-int EFIAPI fnullop_flush (struct __filedes *filp);
-
-int EFIAPI fbadop_stat (struct __filedes *filp, struct stat *StatBuf, void *Buf);
-int EFIAPI fbadop_ioctl (struct __filedes *filp, ULONGN Cmd, va_list argp);
-int EFIAPI fbadop_delete (struct __filedes *filp);
-int EFIAPI fbadop_rmdir (struct __filedes *filp);
-int EFIAPI fbadop_mkdir (const char *path, __mode_t perms);
-int EFIAPI fbadop_rename (const char *from, const char *to);
-
-__END_DECLS
-
-/* From the original file... */
-#if 0
-
-//struct proc;
-//struct lwp;
-//struct uio;
-//struct iovec;
-//struct knote;
-
-//LIST_HEAD(filelist, file);
-//extern struct filelist filehead; /* head of list of open files */
-//extern int maxfiles; /* kernel limit on # of open files */
-//extern int nfiles; /* actual number of open files */
-
-//extern const struct fileops vnops; /* vnode operations for files */
-
-struct fileops {
- int (*fo_read) (struct file *, off_t *, struct uio *, kauth_cred_t, int);
- int (*fo_write) (struct file *, off_t *, struct uio *, kauth_cred_t, int);
- int (*fo_ioctl) (struct file *, u_long, void *, struct lwp *);
- int (*fo_fcntl) (struct file *, u_int, void *, struct lwp *);
- int (*fo_poll) (struct file *, int, struct lwp *);
- int (*fo_stat) (struct file *, struct stat *, struct lwp *);
- int (*fo_close) (struct file *, struct lwp *);
-};
-
-/*
- * Kernel descriptor table.
- * One entry for each open kernel vnode and socket.
- */
-struct file {
- LIST_ENTRY(file) f_list; /* list of active files */
- void *f_data; /* descriptor data, e.g. vnode/socket */
- const struct fileops *f_ops;
- void *f_DevDesc; /* Device Descriptor pointer */
- EFI_FILE_HANDLE FileHandle;
- EFI_HANDLE Handle;
- off_t f_offset; /* current position in file */
- int f_flag; /* see fcntl.h */
- UINT32 f_iflags; /* internal flags; FIF_* */
- int f_advice; /* access pattern hint; UVM_ADV_* */
- int f_type; /* descriptor type */
- int f_usecount; /* number active users */
- u_int f_count; /* reference count */
- u_int f_msgcount; /* references from message queue */
-// kauth_cred_t f_cred; /* creds associated with descriptor */
- struct simplelock f_slock;
- UINT16 MyFD; /* Which FD this is. */
-};
-
-#ifdef DIAGNOSTIC
-#define FILE_USE_CHECK(fp, str) \
- do { \
- if ((fp)->f_usecount < 0) \
- panic(str); \
-} while (/* CONSTCOND */ 0)
-#else
-#define FILE_USE_CHECK(fp, str) /* nothing */
-#endif
-
- /*
- * FILE_USE() must be called with the file lock held.
- * (Typical usage is: `fp = fd_getfile(..); FILE_USE(fp);'
- * and fd_getfile() returns the file locked)
- *
- * fp is a pointer to a __filedes structure.
- */
-#define FILE_USE(fp) \
- do { \
- (fp)->f_usecount++; \
- FILE_USE_CHECK((fp), "f_usecount overflow"); \
- simple_unlock(&(fp)->f_slock); \
- } while (/* CONSTCOND */ 0)
-
-#define FILE_UNUSE_WLOCK(fp, l, havelock) \
- do { \
- if (!(havelock)) \
- simple_lock(&(fp)->f_slock); \
- if ((fp)->f_iflags & FIF_WANTCLOSE) { \
- simple_unlock(&(fp)->f_slock); \
- /* Will drop usecount */ \
- (void) closef((fp), (l)); \
- break; \
- } else { \
- (fp)->f_usecount--; \
- FILE_USE_CHECK((fp), "f_usecount underflow"); \
- } \
- simple_unlock(&(fp)->f_slock); \
- } while (/* CONSTCOND */ 0)
-
-#define FILE_UNUSE(fp, l) FILE_UNUSE_WLOCK(fp, l, 0)
-#define FILE_UNUSE_HAVELOCK(fp, l) FILE_UNUSE_WLOCK(fp, l, 1)
-
-__BEGIN_DECLS
-//int dofileread (struct lwp *, int, struct file *, void *, size_t, off_t *, int, register_t *);
-//int dofilewrite (struct lwp *, int, struct file *, const void *, size_t, off_t *, int, register_t *);
-
-//int dofilereadv (struct lwp *, int, struct file *, const struct iovec *, int, off_t *, int, register_t *);
-//int dofilewritev(struct lwp *, int, struct file *, const struct iovec *, int, off_t *, int, register_t *);
-
-//int fsetown (struct proc *, pid_t *, int, const void *);
-//int fgetown (struct proc *, pid_t, int, void *);
-//void fownsignal (pid_t, int, int, int, void *);
-
-//int fdclone (struct lwp *, struct file *, int, int, const struct fileops *, void *);
-
-/* Commonly used fileops
- fnullop_* Does nothing and returns success.
- fbadop_* Does nothing and returns EPERM
-*/
-//int fnullop_fcntl (struct file *, u_int, void *, struct lwp *);
-//int fnullop_poll (struct file *, int, struct lwp *);
-//int fnullop_kqfilter(struct file *, struct knote *);
-//int fbadop_stat (struct file *, struct stat *, struct lwp *);
-//int fbadop_ioctl (struct file *, u_long, void *, struct lwp *);
-__END_DECLS
-
-#endif
-
-#endif /* _PIF_KFILE_H_ */
diff --git a/StdLibPrivateInternalFiles/Include/namespace.h b/StdLibPrivateInternalFiles/Include/namespace.h
deleted file mode 100644
index b56dc96277..0000000000
--- a/StdLibPrivateInternalFiles/Include/namespace.h
+++ /dev/null
@@ -1,779 +0,0 @@
-/* $NetBSD: namespace.h,v 1.125 2006/11/08 20:37:14 drochner Exp $ */
-
-/*-
- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _NAMESPACE_H_
-#define _NAMESPACE_H_
-
-#include <sys/EfiCdefs.h>
-
-#ifndef __lint__
-#define ftello _ftello
-#define getcontext _getcontext
-#define getenv_r _getenv_r
-#define strtof _strtof
-#define strtoimax _strtoimax
-#define strtold _strtold
-#define strtoll _strtoll
-#define strtoull _strtoull
-#define strtoumax _strtoumax
-#define vfscanf __svfscanf
-
-#if 0
-#define brk _brk
-#define catclose _catclose
-#define catgets _catgets
-#define catopen _catopen
-#define daylight _daylight
-#define err _err
-#define errx _errx
-#ifdef _REENTRANT
-#define fileno _fileno
-#endif /* _REENTRANT */
-#define fork _fork
-#define fseeko _fseeko
-#define inet_aton _inet_aton
-#define inet_pton _inet_pton
-#define pipe _pipe
-#define sbrk _sbrk
-#define strerror_r _strerror_r
-#define strlcat _strlcat
-#define strlcpy _strlcpy
-#define sys_errlist _sys_errlist
-#define sys_nerr _sys_nerr
-#define sys_siglist _sys_siglist
-#define sys_nsig _sys_nsig
-#define sysconf __sysconf
-#define verr _verr
-#define verrx _verrx
-#define vwarn _vwarn
-#define vwarnx _vwarnx
-#define warn _warn
-#define warnx _warnx
-
-//#ifdef __weak_alias
-#define MD2Data _MD2Data
-#define MD2End _MD2End
-#define MD2FileChunk _MD2FileChunk
-#define MD2File _MD2File
-#define MD2Final _MD2Final
-#define MD2Init _MD2Init
-#define MD2Transform _MD2Transform
-#define MD2Update _MD2Update
-#define MD4Data _MD4Data
-#define MD4End _MD4End
-#define MD4FileChunk _MD4FileChunk
-#define MD4File _MD4File
-#define MD4Final _MD4Final
-#define MD4Init _MD4Init
-#define MD4Transform _MD4Transform
-#define MD4Update _MD4Update
-#define MD5Data _MD5Data
-#define MD5End _MD5End
-#define MD5FileChunk _MD5FileChunk
-#define MD5File _MD5File
-#define MD5Final _MD5Final
-#define MD5Init _MD5Init
-#define MD5Transform _MD5Transform
-#define MD5Update _MD5Update
-#define RMD160Data _RMD160Data
-#define RMD160End _RMD160End
-#define RMD160FileChunk _RMD160FileChunk
-#define RMD160File _RMD160File
-#define RMD160Final _RMD160Final
-#define RMD160Init _RMD160Init
-#define RMD160Transform _RMD160Transform
-#define RMD160Update _RMD160Update
-#define SHA1Data _SHA1Data
-#define SHA1End _SHA1End
-#define SHA1FileChunk _SHA1FileChunk
-#define SHA1File _SHA1File
-#define SHA1Final _SHA1Final
-#define SHA1Init _SHA1Init
-#define SHA1Transform _SHA1Transform
-#define SHA1Update _SHA1Update
-#define SHA256_Data _SHA256_Data
-#define SHA256_End _SHA256_End
-#define SHA256_FileChunk _SHA256_FileChunk
-#define SHA256_File _SHA256_File
-#define SHA256_Final _SHA256_Final
-#define SHA256_Init _SHA256_Init
-#define SHA256_Transform _SHA256_Transform
-#define SHA256_Update _SHA256_Update
-#define SHA384_Data _SHA384_Data
-#define SHA384_End _SHA384_End
-#define SHA384_FileChunk _SHA384_FileChunk
-#define SHA384_File _SHA384_File
-#define SHA384_Final _SHA384_Final
-#define SHA384_Init _SHA384_Init
-#define SHA384_Transform _SHA384_Transform
-#define SHA384_Update _SHA384_Update
-#define SHA512_Data _SHA512_Data
-#define SHA512_End _SHA512_End
-#define SHA512_FileChunk _SHA512_FileChunk
-#define SHA512_File _SHA512_File
-#define SHA512_Final _SHA512_Final
-#define SHA512_Init _SHA512_Init
-#define SHA512_Transform _SHA512_Transform
-#define SHA512_Update _SHA512_Update
-#define a64l _a64l
-#define adjtime _adjtime
-#define alarm _alarm
-#define alphasort _alphasort
-#define arc4random _arc4random
-#define asctime_r _asctime_r
-#define asprintf _asprintf
-#define atoll _atoll
-#define authnone_create _authnone_create
-#define authunix_create _authunix_create
-#define authunix_create_default _authunix_create_default
-#define basename _basename
-#define bindresvport _bindresvport
-#define bindresvport_sa _bindresvport_sa
-#define bm_comp _bm_comp
-#define bm_exec _bm_exec
-#define bm_free _bm_free
-#define callrpc _callrpc
-#define cfgetispeed _cfgetispeed
-#define cfgetospeed _cfgetospeed
-#define cfmakeraw _cfmakeraw
-#define cfsetispeed _cfsetispeed
-#define cfsetospeed _cfsetospeed
-#define cfsetspeed _cfsetspeed
-#define cgetcap _cgetcap
-#define cgetclose _cgetclose
-#define cgetent _cgetent
-#define cgetfirst _cgetfirst
-#define cgetmatch _cgetmatch
-#define cgetnext _cgetnext
-#define cgetnum _cgetnum
-#define cgetset _cgetset
-#define cgetstr _cgetstr
-#define cgetustr _cgetustr
-#define clnt_broadcast _clnt_broadcast
-#define clnt_create _clnt_create
-#define clnt_create_vers _clnt_create_vers
-#define clnt_dg_create _clnt_dg_create
-#define clnt_pcreateerror _clnt_pcreateerror
-#define clnt_perrno _clnt_perrno
-#define clnt_perror _clnt_perror
-#define clnt_raw_create _clnt_raw_create
-#define clnt_tli_create _clnt_tli_create
-#define clnt_tp_create _clnt_tp_create
-#define clnt_spcreateerror _clnt_spcreateerror
-#define clnt_sperrno _clnt_sperrno
-#define clnt_sperror _clnt_sperror
-#define clnt_vc_create _clnt_vc_create
-#define clntraw_create _clntraw_create
-#define clnttcp_create _clnttcp_create
-#define clntudp_bufcreate _clntudp_bufcreate
-#define clntudp_create _clntudp_create
-#define clock_settime _clock_settime
-#define closedir _closedir
-#define closelog _closelog
-#define closelog_r _closelog_r
-#define confstr _confstr
-#define ctermid _ctermid
-#define ctime_r _ctime_r
-#define daemon _daemon
-#define dbopen _dbopen
-#define devname _devname
-#define dirname _dirname
-#define dn_expand _dn_expand
-#define drand48 _drand48
-#define endfsent _endfsent
-#define endgrent _endgrent
-#define endhostent _endhostent
-#define endnetconfig _endnetconfig
-#define endnetent _endnetent
-#define endnetgrent _endnetgrent
-#define endnetpath _endnetpath
-#define endprotoent _endprotoent
-#define endprotoent_r _endprotoent_r
-#define endpwent _endpwent
-#define endrpcent _endrpcent
-#define endservent _endservent
-#define endservent_r _endservent_r
-#define endttyent _endttyent
-#define endusershell _endusershell
-#define erand48 _erand48
-#define ether_aton _ether_aton
-#define ether_hostton _ether_hostton
-#define ether_line _ether_line
-#define ether_ntoa _ether_ntoa
-#define ether_ntohost _ether_ntohost
-#define execl _execl
-#define execle _execle
-#define execlp _execlp
-#define execv _execv
-#define execvp _execvp
-#define fdopen _fdopen
-#define fgetln _fgetln
-#define fgetwln _fgetwln
-#define fhstatvfs _fhstatvfs
-#define flockfile _flockfile
-#define ftrylockfile _ftrylockfile
-#define funlockfile _funlockfile
-#define fnmatch _fnmatch
-#define fpgetmask _fpgetmask
-#define fpgetround _fpgetround
-#define fpgetsticky _fpgetsticky
-#define fpsetmask _fpsetmask
-#define fpsetround _fpsetround
-#define fpsetsticky _fpsetsticky
-#define freenetconfigent _freenetconfigent
-#define freeaddrinfo _freeaddrinfo
-#define freeifaddrs _freeifaddrs
-#define fstatvfs _fstatvfs
-#define ftok _ftok
-#define ftruncate _ftruncate
-#define fts_children _fts_children
-#define fts_close _fts_close
-#define fts_open _fts_open
-#define fts_read _fts_read
-#define fts_set _fts_set
-#define gai_strerror _gai_strerror
-#define get_myaddress _get_myaddress
-#define getaddrinfo _getaddrinfo
-#define getbsize _getbsize
-#define getcwd _getcwd
-#define getdevmajor _getdevmajor
-#define getdiskbyname _getdiskbyname
-#define getdomainname _getdomainname
-#define getfsent _getfsent
-#define getfsfile _getfsfile
-#define getfsspec _getfsspec
-#define getgrent _getgrent
-#define getgrent_r _getgrent_r
-#define getgrgid _getgrgid
-#define getgrgid_r _getgrgid_r
-#define getgrnam _getgrnam
-#define getgrnam_r _getgrnam_r
-#define getgrouplist _getgrouplist
-#define getgroupmembership _getgroupmembership
-#define gethostbyaddr _gethostbyaddr
-#define gethostbyname _gethostbyname
-#define gethostent _gethostent
-#define gethostname _gethostname
-#define getifaddrs _getifaddrs
-#define getloadavg _getloadavg
-#define getlogin _getlogin
-#define getmntinfo _getmntinfo
-#define getmode _getmode
-#define getnameinfo _getnameinfo
-#define getnetbyaddr _getnetbyaddr
-#define getnetbyname _getnetbyname
-#define getnetconfig _getnetconfig
-#define getnetconfigent _getnetconfigent
-#define getnetent _getnetent
-#define getnetgrent _getnetgrent
-#define getnetpath _getnetpath
-#define getopt _getopt
-#define getopt_long _getopt_long
-#define getpagesize _getpagesize
-#define getpass _getpass
-#define getprogname _getprogname
-#define getprotobyname _getprotobyname
-#define getprotobyname_r _getprotobyname_r
-#define getprotobynumber _getprotobynumber
-#define getprotobynumber_r _getprotobynumber_r
-#define getprotoent _getprotoent
-#define getprotoent_r _getprotoent_r
-#define getpwent _getpwent
-#define getpwent_r _getpwent_r
-#define getpwnam _getpwnam
-#define getpwnam_r _getpwnam_r
-#define getpwuid _getpwuid
-#define getpwuid_r _getpwuid_r
-#define getrpcbyname _getrpcbyname
-#define getrpcbyname_r _getrpcbyname_r
-#define getrpcbynumber _getrpcbynumber
-#define getrpcbynumber_r _getrpcbynumber_r
-#define getrpcent _getrpcent
-#define getrpcent_r _getrpcent_r
-#define getrpcport _getrpcport
-#define getservbyname _getservbyname
-#define getservbyname_r _getservbyname_r
-#define getservbyport _getservbyport
-#define getservbyport_r _getservbyport_r
-#define getservent _getservent
-#define getservent_r _getservent_r
-#define getsubopt _getsubopt
-#define getttyent _getttyent
-#define getttynam _getttynam
-#define getusershell _getusershell
-#define glob _glob
-#define globfree _globfree
-#define gmtime_r _gmtime_r
-#define group_from_gid _group_from_gid
-#define heapsort _heapsort
-#define herror _herror
-#define hes_error _hes_error
-#define hes_free _hes_free
-#define hes_init _hes_init
-#define hes_resolve _hes_resolve
-#define hes_to_bind _hes_to_bind
-#define hesiod_end _hesiod_end
-#define hesiod_free_list _hesiod_free_list
-#define hesiod_init _hesiod_init
-#define hesiod_resolve _hesiod_resolve
-#define hesiod_to_bind _hesiod_to_bind
-#define iconv _iconv
-#define iconv_open _iconv_open
-#define iconv_close _iconv_close
-#define if_freenameindex _if_freenameindex
-#define if_indextoname _if_indextoname
-#define if_nameindex _if_nameindex
-#define if_nametoindex _if_nametoindex
-#define in6addr_any _in6addr_any
-#define in6addr_linklocal_allnodes _in6addr_linklocal_allnodes
-#define in6addr_linklocal_allrouters _in6addr_linklocal_allrouters
-#define in6addr_loopback _in6addr_loopback
-#define in6addr_nodelocal_allnodes _in6addr_nodelocal_allnodes
-#define inet6_option_alloc _inet6_option_alloc
-#define inet6_option_append _inet6_option_append
-#define inet6_option_find _inet6_option_find
-#define inet6_option_init _inet6_option_init
-#define inet6_option_next _inet6_option_next
-#define inet6_option_space _inet6_option_space
-#define inet6_opt_init _inet6_opt_init
-#define inet6_opt_append _inet6_opt_append
-#define inet6_opt_finish _inet6_opt_finish
-#define inet6_opt_set_val _inet6_opt_set_val
-#define inet6_opt_next _inet6_opt_next
-#define inet6_opt_find _inet6_opt_find
-#define inet6_opt_get_val _inet6_opt_get_val
-#define inet6_rthdr_add _inet6_rthdr_add
-#define inet6_rthdr_getaddr _inet6_rthdr_getaddr
-#define inet6_rthdr_getflags _inet6_rthdr_getflags
-#define inet6_rthdr_init _inet6_rthdr_init
-#define inet6_rthdr_lasthop _inet6_rthdr_lasthop
-#define inet6_rthdr_segments _inet6_rthdr_segments
-#define inet6_rthdr_space _inet6_rthdr_space
-#define inet6_rth_space _inet6_rth_space
-#define inet6_rth_init _inet6_rth_init
-#define inet6_rth_add _inet6_rth_add
-#define inet6_rth_reverse _inet6_rth_reverse
-#define inet6_rth_segments _inet6_rth_segments
-#define inet6_rth_getaddr _inet6_rth_getaddr
-#define inet_cidr_ntop _inet_cidr_ntop
-#define inet_cidr_pton _inet_cidr_pton
-#define inet_lnaof _inet_lnaof
-#define inet_makeaddr _inet_makeaddr
-#define inet_net_ntop _inet_net_ntop
-#define inet_net_pton _inet_net_pton
-#define inet_neta _inet_neta
-#define inet_netof _inet_netof
-#define inet_network _inet_network
-#define inet_nsap_addr _inet_nsap_addr
-#define inet_nsap_ntoa _inet_nsap_ntoa
-#define inet_ntoa _inet_ntoa
-#define inet_ntop _inet_ntop
-#define initgroups _initgroups
-#define initstate _initstate
-#define innetgr _innetgr
-#define isatty _isatty
-#define jrand48 _jrand48
-#define kill _kill
-#define l64a _l64a
-#define l64a_r _l64a_r
-#define lcong48 _lcong48
-#define llabs _llabs
-#define lldiv _lldiv
-#define localtime_r _localtime_r
-#define lockf _lockf
-#define lrand48 _lrand48
-#define lseek _lseek
-#define mergesort _mergesort
-#define mkstemp _mkstemp
-#define mmap _mmap
-#define mpool_close _mpool_close
-#define mpool_filter _mpool_filter
-#define mpool_get _mpool_get
-#define mpool_new _mpool_new
-#define mpool_open _mpool_open
-#define mpool_put _mpool_put
-#define mpool_sync _mpool_sync
-#define mrand48 _mrand48
-#define nc_perror _nc_perror
-#define nc_sperror _nc_sperror
-#define nice _nice
-#define nrand48 _nrand48
-#define ntp_adjtime _ntp_adjtime
-#define nsdispatch _nsdispatch
-#define offtime _offtime
-#define opendir _opendir
-#define openlog _openlog
-#define openlog_r _openlog_r
-#define pause _pause
-#define pclose _pclose
-#define pmap_getmaps _pmap_getmaps
-#define pmap_getport _pmap_getport
-#define pmap_rmtcall _pmap_rmtcall
-#define pmap_set _pmap_set
-#define pmap_unset _pmap_unset
-#define popen _popen
-#define posix2time _posix2time
-#define pread _pread
-#define psignal _psignal
-#define pthread_atfork _pthread_atfork
-#define putenv _putenv
-#define pwcache_groupdb _pwcache_groupdb
-#define pwcache_userdb _pwcache_userdb
-#define pwrite _pwrite
-#define qabs _qabs
-#define qdiv _qdiv
-#define radixsort _radixsort
-#define random _random
-#define randomid _randomid
-#define randomid_new _randomid_new
-#define randomid_delete _randomid_delete
-#define readdir _readdir
-#define readdir_r _readdir_r
-#define realpath _realpath
-#define regcomp _regcomp
-#define regerror _regerror
-#define regexec _regexec
-#define regfree _regfree
-#define registerrpc _registerrpc
-#define res_init _res_init
-#define res_mkquery _res_mkquery
-#define res_query _res_query
-#define res_search _res_search
-#define rewinddir _rewinddir
-#define rpc_broadcast _rpc_broadcast
-#define rpc_broadcast_exp _rpc_broadcast_exp
-#define rpc_call _rpc_call
-#define rpc_control _rpc_control
-#define rpc_reg _rpc_reg
-#define rpcb_getmaps _rpcb_getmaps
-#define rpcb_gettime _rpcb_gettime
-#define rpcb_rmtcall _rpcb_rmtcall
-#define rpcb_set _rpcb_set
-#define rpcb_taddr2uaddr _rpcb_taddr2uaddr
-#define rpcb_uaddr2taddr _rpcb_uaddr2taddr
-#define rpcb_unset _rpcb_unset
-#define scandir _scandir
-#define seed48 _seed48
-#define seekdir _seekdir
-#define send _send
-#define setdomainname _setdomainname
-#define setenv _setenv
-#define setfsent _setfsent
-#define setgrent _setgrent
-#define setgroupent _setgroupent
-#define sethostent _sethostent
-#define sethostname _sethostname
-#define setlogin _setlogin
-#define setlogmask _setlogmask
-#define setlogmask_r _setlogmask_r
-#define setmode _setmode
-#define setnetconfig _setnetconfig
-#define setnetent _setnetent
-#define setnetgrent _setnetgrent
-#define setpassent _setpassent
-#define setnetpath _setnetpath
-#define setproctitle _setproctitle
-#define setprotoent _setprotoent
-#define setprotoent_r _setprotoent_r
-#define setpwent _setpwent
-#define setrpcent _setrpcent
-#define setservent _setservent
-#define setservent_r _setservent_r
-#define setstate _setstate
-#define setttyent _setttyent
-#define setttyentpath _setttyentpath
-#define settimeofday _settimeofday
-#define setusershell _setusershell
-#define shm_open _shm_open
-#define shm_unlink _shm_unlink
-#define shquote _shquote
-#define siginterrupt _siginterrupt
-#define signal _signal
-#define sl_add _sl_add
-#define sl_create _sl_create
-#define sl_find _sl_find
-#define sl_free _sl_free
-#define sl_init _sl_init
-#define sleep _sleep
-#define snprintf _snprintf
-#define snprintf_ss _snprintf_ss
-#define sradixsort _sradixsort
-#define srand48 _srand48
-#define srandom _srandom
-#define statvfs(a, b) _statvfs(a, b)
-#define strcasecmp _strcasecmp
-#define strdup _strdup
-#define stresep _stresep
-#define strndup _strndup
-#define strncasecmp _strncasecmp
-#define strptime _strptime
-#define strsep _strsep
-#define strsignal _strsignal
-#define strsuftoll _strsuftoll
-#define strsuftollx _strsuftollx
-#define strsvis _strsvis
-#define strsvisx _strsvisx
-#define strtok_r _strtok_r
-#define strunvis _strunvis
-#define strvis _strvis
-#define strvisx _strvisx
-#define svc_auth_reg _svc_auth_reg
-#define svc_create _svc_create
-#define svc_dg_create _svc_dg_create
-#define svc_exit _svc_exit
-#define svc_fd_create _svc_fd_create
-#define svc_getreq _svc_getreq
-#define svc_getreqset _svc_getreqset
-#define svc_getreq_common _svc_getreq_common
-#define svc_raw_create _svc_raw_create
-#define svc_register _svc_register
-#define svc_reg _svc_reg
-#define svc_run _svc_run
-#define svc_sendreply _svc_sendreply
-#define svc_tli_create _svc_tli_create
-#define svc_tp_create _svc_tp_create
-#define svc_unregister _svc_unregister
-#define svc_unreg _svc_unreg
-#define svc_vc_create _svc_vc_create
-#define svcerr_auth _svcerr_auth
-#define svcerr_decode _svcerr_decode
-#define svcerr_noproc _svcerr_noproc
-#define svcerr_noprog _svcerr_noprog
-#define svcerr_progvers _svcerr_progvers
-#define svcerr_systemerr _svcerr_systemerr
-#define svcerr_weakauth _svcerr_weakauth
-#define svcfd_create _svcfd_create
-#define svcraw_create _svcraw_create
-#define svctcp_create _svctcp_create
-#define svcudp_bufcreate _svcudp_bufcreate
-#define svcudp_create _svcudp_create
-#define svcudp_enablecache _svcudp_enablecache
-#define svis _svis
-#define sysarch _sys_sysarch
-#define sysctl _sysctl
-#define sysctlbyname _sysctlbyname
-#define sysctlgetmibinfo _sysctlgetmibinfo
-#define sysctlnametomib _sysctlnametomib
-#define syslog _syslog
-#define syslog_r _syslog_r
-#define syslog_ss _syslog_ss
-#define taddr2uaddr _taddr2uaddr
-#define tcdrain _tcdrain
-#define tcflow _tcflow
-#define tcflush _tcflush
-#define tcgetattr _tcgetattr
-#define tcgetpgrp _tcgetpgrp
-#define tcgetsid _tcgetsid
-#define tcsendbreak _tcsendbreak
-#define tcsetattr _tcsetattr
-#define tcsetpgrp _tcsetpgrp
-#define telldir _telldir
-#define time _time
-#define time2posix _time2posix
-#define timegm _timegm
-#define timelocal _timelocal
-#define timeoff _timeoff
-#define times _times
-#define ttyname _ttyname
-#define ttyname_r _ttyname_r
-#define ttyslot _ttyslot
-#define tzname _tzname
-#define tzset _tzset
-#define tzsetwall _tzsetwall
-#define uaddr2taddr _uaddr2taddr
-#define ualarm _ualarm
-#define uname _uname
-#define unsetenv _unsetenv
-#define unvis _unvis
-#define user_from_uid _user_from_uid
-#define usleep _usleep
-#define utime _utime
-#define uuid_create_nil _uuid_create_nil
-#define uuid_is_nil _uuid_is_nil
-#define valloc _valloc
-#define vis _vis
-#define vsnprintf _vsnprintf
-#define vsnprintf_ss _vsnprintf_ss
-#define vsyslog _vsyslog
-#define vsyslog_r _vsyslog_r
-#define vsyslog_ss _vsyslog_ss
-#define wait _wait
-#define wait3 _wait3
-#define waitpid _waitpid
-#define wcscasecmp _wcscasecmp
-#define wcsdup _wcsdup
-#define wcsncasecmp _wcsncasecmp
-#define wcstof _wcstof
-#define wcstod _wcstod
-#define wcstold _wcstold
-#define wcwidth _wcwidth
-#define xdr_accepted_reply _xdr_accepted_reply
-#define xdr_array _xdr_array
-#define xdr_authunix_parms _xdr_authunix_parms
-#define xdr_bool _xdr_bool
-#define xdr_bytes _xdr_bytes
-#define xdr_callhdr _xdr_callhdr
-#define xdr_callmsg _xdr_callmsg
-#define xdr_char _xdr_char
-#define xdr_datum _xdr_datum
-#define xdr_des_block _xdr_des_block
-#define xdr_domainname _xdr_domainname
-#define xdr_double _xdr_double
-#define xdr_enum _xdr_enum
-#define xdr_float _xdr_float
-#define xdr_free _xdr_free
-#define xdr_hyper _xdr_hyper
-#define xdr_int _xdr_int
-#define xdr_int16_t _xdr_int16_t
-#define xdr_int32_t _xdr_int32_t
-#define xdr_int64_t _xdr_int64_t
-#define xdr_long _xdr_long
-#define xdr_longlong_t _xdr_longlong_t
-#define xdr_mapname _xdr_mapname
-#define xdr_netbuf _xdr_netbuf
-#define xdr_netobj _xdr_netobj
-#define xdr_opaque _xdr_opaque
-#define xdr_opaque_auth _xdr_opaque_auth
-#define xdr_peername _xdr_peername
-#define xdr_pmap _xdr_pmap
-#define xdr_pmaplist _xdr_pmaplist
-#define xdr_pointer _xdr_pointer
-#define xdr_reference _xdr_reference
-#define xdr_rejected_reply _xdr_rejected_reply
-#define xdr_replymsg _xdr_replymsg
-#define xdr_rmtcall_args _xdr_rmtcall_args
-#define xdr_rmtcallres _xdr_rmtcallres
-#define xdr_rpcb _xdr_rpcb
-#define xdr_rpcb_entry _xdr_rpcb_entry
-#define xdr_rpcb_entry_list_ptr _xdr_rpcb_entry_list_ptr
-#define xdr_rpcb_rmtcallargs _xdr_rpcb_rmtcallargs
-#define xdr_rpcb_rmtcallres _xdr_rpcb_rmtcallres
-#define xdr_rpcb_stat _xdr_rpcb_stat
-#define xdr_rpcb_stat_byvers _xdr_rpcb_stat_byvers
-#define xdr_rpcblist _xdr_rpcblist
-#define xdr_rpcblist_ptr _xdr_rpcblist_ptr
-#define xdr_rpcbs_addrlist _xdr_rpcbs_addrlist
-#define xdr_rpcbs_addrlist_ptr _xdr_rpcbs_addrlist_ptr
-#define xdr_rpcbs_proc _xdr_rpcbs_proc
-#define xdr_rpcbs_rmtcalllist _xdr_rpcbs_rmtcalllist
-#define xdr_rpcbs_rmtcalllist_ptr _xdr_rpcbs_rmtcalllist_ptr
-#define xdr_rpcbs _xdr_rpcbs
-#define xdr_rpcbs _xdr_rpcbs
-#define xdr_short _xdr_short
-#define xdr_string _xdr_string
-#define xdr_u_char _xdr_u_char
-#define xdr_u_hyper _xdr_u_hyper
-#define xdr_u_int _xdr_u_int
-#define xdr_u_int16_t _xdr_u_int16_t
-#define xdr_u_int32_t _xdr_u_int32_t
-#define xdr_u_int64_t _xdr_u_int64_t
-#define xdr_u_long _xdr_u_long
-#define xdr_u_longlong_t _xdr_u_longlong_t
-#define xdr_u_short _xdr_u_short
-#define xdr_union _xdr_union
-#define xdr_vector _xdr_vector
-#define xdr_void _xdr_void
-#define xdr_wrapstring _xdr_wrapstring
-#define xdr_yp_inaddr _xdr_yp_inaddr
-#define xdr_ypall _xdr_ypall
-#define xdr_ypbind_resp _xdr_ypbind_resp
-#define xdr_ypbind_setdom _xdr_ypbind_setdom
-#define xdr_ypdomain_wrap_string _xdr_ypdomain_wrap_string
-#define xdr_ypmap_parms _xdr_ypmap_parms
-#define xdr_ypmap_wrap_string _xdr_ypmap_wrap_string
-#define xdr_ypmaplist _xdr_ypmaplist
-#define xdr_ypowner_wrap_string _xdr_ypowner_wrap_string
-#define xdr_yppushresp_xfr _xdr_yppushresp_xfr
-#define xdr_ypreq_key _xdr_ypreq_key
-#define xdr_ypreq_nokey _xdr_ypreq_nokey
-#define xdr_ypreq_xfr _xdr_ypreq_xfr
-#define xdr_ypresp_key_val _xdr_ypresp_key_val
-#define xdr_ypresp_maplist _xdr_ypresp_maplist
-#define xdr_ypresp_master _xdr_ypresp_master
-#define xdr_ypresp_order _xdr_ypresp_order
-#define xdr_ypresp_val _xdr_ypresp_val
-#define xdrmem_create _xdrmem_create
-#define xdrrec_create _xdrrec_create
-#define xdrrec_endofrecord _xdrrec_endofrecord
-#define xdrrec_eof _xdrrec_eof
-#define xdrrec_skiprecord _xdrrec_skiprecord
-#define xdrstdio_create _xdrstdio_create
-#define xprt_register _xprt_register
-#define xprt_unregister _xprt_unregister
-#define yp_all _yp_all
-#define yp_bind _yp_bind
-#define yp_first _yp_first
-#define yp_get_default_domain _yp_get_default_domain
-#define yp_maplist _yp_maplist
-#define yp_master _yp_master
-#define yp_match _yp_match
-#define yp_next _yp_next
-#define yp_order _yp_order
-#define yp_unbind _yp_unbind
-#define yperr_string _yperr_string
-#define ypprot_err _ypprot_err
-#define dlopen __dlopen
-#define dlclose __dlclose
-#define dlsym __dlsym
-#define dlerror __dlerror
-#define dladdr __dladdr
-#define fmtcheck __fmtcheck
-
-/* rpc locks */
-#define authdes_lock __rpc_authdes_lock
-#define authnone_lock __rpc_authnone_lock
-#define authsvc_lock __rpc_authsvc_lock
-#define clnt_fd_lock __rpc_clnt_fd_lock
-#define clntraw_lock __rpc_clntraw_lock
-#define dname_lock __rpc_dname_lock
-#define dupreq_lock __rpc_dupreq_lock
-#define keyserv_lock __rpc_keyserv_lock
-#define libnsl_trace_lock __rpc_libnsl_trace_lock
-#define loopnconf_lock __rpc_loopnconf_lock
-#define ops_lock __rpc_ops_lock
-#define portnum_lock __rpc_portnum_lock
-#define proglst_lock __rpc_proglst_lock
-#define rpcbaddr_cache_lock __rpc_rpcbaddr_cache_lock
-#define rpcsoc_lock __rpc_rpcsoc_lock
-#define svc_fd_lock __rpc_svc_fd_lock
-#define svc_lock __rpc_svc_lock
-#define svcraw_lock __rpc_svcraw_lock
-#define xprtlist_lock __rpc_xprtlist_lock
-
-#define __learn_tree ___learn_tree
-#endif /* __weak_alias */
-#endif /* !__lint__ */
-
-#endif /* _NAMESPACE_H_ */
diff --git a/StdLibPrivateInternalFiles/Include/reentrant.h b/StdLibPrivateInternalFiles/Include/reentrant.h
deleted file mode 100644
index 157d4b1853..0000000000
--- a/StdLibPrivateInternalFiles/Include/reentrant.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/* $NetBSD: reentrant.h,v 1.10 2004/12/14 00:23:19 nathanw Exp $ */
-
-/*-
- * Copyright (c) 1997, 1998, 2003 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by J.T. Conklin, by Nathan J. Williams, and by Jason R. Thorpe.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the NetBSD
- * Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-/*
- * Requirements:
- *
- * 1. The thread safe mechanism should be lightweight so the library can
- * be used by non-threaded applications without unreasonable overhead.
- *
- * 2. There should be no dependency on a thread engine for non-threaded
- * applications.
- *
- * 3. There should be no dependency on any particular thread engine.
- *
- * 4. The library should be able to be compiled without support for thread
- * safety.
- *
- *
- * Rationale:
- *
- * One approach for thread safety is to provide discrete versions of the
- * library: one thread safe, the other not. The disadvantage of this is
- * that libc is rather large, and two copies of a library which are 99%+
- * identical is not an efficent use of resources.
- *
- * Another approach is to provide a single thread safe library. However,
- * it should not add significant run time or code size overhead to non-
- * threaded applications.
- *
- * Since the NetBSD C library is used in other projects, it should be
- * easy to replace the mutual exclusion primitives with ones provided by
- * another system. Similarly, it should also be easy to remove all
- * support for thread safety completely if the target environment does
- * not support threads.
- *
- *
- * Implementation Details:
- *
- * The thread primitives used by the library (mutex_t, mutex_lock, etc.)
- * are macros which expand to the cooresponding primitives provided by
- * the thread engine or to nothing. The latter is used so that code is
- * not unreasonably cluttered with #ifdefs when all thread safe support
- * is removed.
- *
- * The thread macros can be directly mapped to the mutex primitives from
- * pthreads, however it should be reasonably easy to wrap another mutex
- * implementation so it presents a similar interface.
- *
- * The thread functions operate by dispatching to symbols which are, by
- * default, weak-aliased to no-op functions in thread-stub/thread-stub.c
- * (some uses of thread operations are conditional on __isthreaded, but
- * not all of them are).
- *
- * When the thread library is linked in, it provides strong-alias versions
- * of those symbols which dispatch to its own real thread operations.
- *
- */
-
-#ifdef _REENTRANT
-
-/*
- * Abtract thread interface for thread-safe libraries. These routines
- * will use stubs in libc if the application is not linked against the
- * pthread library, and the real function in the pthread library if it
- * is.
- */
-
-#include <pthread.h>
-#include <signal.h>
-
-#define mutex_t pthread_mutex_t
-#define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
-
-#define mutexattr_t pthread_mutexattr_t
-
-#define MUTEX_TYPE_NORMAL PTHREAD_MUTEX_NORMAL
-#define MUTEX_TYPE_ERRORCHECK PTHREAD_MUTEX_ERRORCHECK
-#define MUTEX_TYPE_RECURSIVE PTHREAD_MUTEX_RECURSIVE
-
-#define cond_t pthread_cond_t
-#define COND_INITIALIZER PTHREAD_COND_INITIALIZER
-
-#define condattr_t pthread_condattr_t
-
-#define rwlock_t pthread_rwlock_t
-#define RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER
-
-#define rwlockattr_t pthread_rwlockattr_t
-
-#define thread_key_t pthread_key_t
-
-#define thr_t pthread_t
-
-#define thrattr_t pthread_attr_t
-
-#define once_t pthread_once_t
-#define ONCE_INITIALIZER PTHREAD_ONCE_INIT
-
-#ifndef __LIBC_THREAD_STUBS
-
-__BEGIN_DECLS
-int __libc_mutex_init(mutex_t *, const mutexattr_t *);
-int __libc_mutex_lock(mutex_t *);
-int __libc_mutex_trylock(mutex_t *);
-int __libc_mutex_unlock(mutex_t *);
-int __libc_mutex_destroy(mutex_t *);
-
-int __libc_mutexattr_init(mutexattr_t *);
-int __libc_mutexattr_settype(mutexattr_t *, int);
-int __libc_mutexattr_destroy(mutexattr_t *);
-__END_DECLS
-
-#define mutex_init(m, a) __libc_mutex_init((m), (a))
-#define mutex_lock(m) __libc_mutex_lock((m))
-#define mutex_trylock(m) __libc_mutex_trylock((m))
-#define mutex_unlock(m) __libc_mutex_unlock((m))
-#define mutex_destroy(m) __libc_mutex_destroy((m))
-
-#define mutexattr_init(ma) __libc_mutexattr_init((ma))
-#define mutexattr_settype(ma, t) __libc_mutexattr_settype((ma), (t))
-#define mutexattr_destroy(ma) __libc_mutexattr_destroy((ma))
-
-__BEGIN_DECLS
-int __libc_cond_init(cond_t *, const condattr_t *);
-int __libc_cond_signal(cond_t *);
-int __libc_cond_broadcast(cond_t *);
-int __libc_cond_wait(cond_t *, mutex_t *);
-int __libc_cond_timedwait(cond_t *, mutex_t *, const struct timespec *);
-int __libc_cond_destroy(cond_t *);
-__END_DECLS
-
-#define cond_init(c, t, a) __libc_cond_init((c), (a))
-#define cond_signal(c) __libc_cond_signal((c))
-#define cond_broadcast(c) __libc_cond_broadcast((c))
-#define cond_wait(c, m) __libc_cond_wait((c), (m))
-#define cond_timedwait(c, m, t) __libc_cond_timedwait((c), (m), (t))
-#define cond_destroy(c) __libc_cond_destroy((c))
-
-__BEGIN_DECLS
-int __libc_rwlock_init(rwlock_t *, const rwlockattr_t *);
-int __libc_rwlock_rdlock(rwlock_t *);
-int __libc_rwlock_wrlock(rwlock_t *);
-int __libc_rwlock_tryrdlock(rwlock_t *);
-int __libc_rwlock_trywrlock(rwlock_t *);
-int __libc_rwlock_unlock(rwlock_t *);
-int __libc_rwlock_destroy(rwlock_t *);
-__END_DECLS
-
-#define rwlock_init(l, a) __libc_rwlock_init((l), (a))
-#define rwlock_rdlock(l) __libc_rwlock_rdlock((l))
-#define rwlock_wrlock(l) __libc_rwlock_wrlock((l))
-#define rwlock_tryrdlock(l) __libc_rwlock_tryrdlock((l))
-#define rwlock_trywrlock(l) __libc_rwlock_trywrlock((l))
-#define rwlock_unlock(l) __libc_rwlock_unlock((l))
-#define rwlock_destroy(l) __libc_rwlock_destroy((l))
-
-__BEGIN_DECLS
-int __libc_thr_keycreate(thread_key_t *, void (*)(void *));
-int __libc_thr_setspecific(thread_key_t, const void *);
-void *__libc_thr_getspecific(thread_key_t);
-int __libc_thr_keydelete(thread_key_t);
-__END_DECLS
-
-#define thr_keycreate(k, d) __libc_thr_keycreate((k), (d))
-#define thr_setspecific(k, p) __libc_thr_setspecific((k), (p))
-#define thr_getspecific(k) __libc_thr_getspecific((k))
-#define thr_keydelete(k) __libc_thr_keydelete((k))
-
-__BEGIN_DECLS
-int __libc_thr_once(once_t *, void (*)(void));
-int __libc_thr_sigsetmask(int, const sigset_t *, sigset_t *);
-thr_t __libc_thr_self(void);
-int __libc_thr_yield(void);
-void __libc_thr_create(thr_t *, const thrattr_t *,
- void *(*)(void *), void *);
-void __libc_thr_exit(void *) __attribute__((__noreturn__));
-int *__libc_thr_errno(void);
-int __libc_thr_setcancelstate(int, int *);
-
-extern int __isthreaded;
-__END_DECLS
-
-#define thr_once(o, f) __libc_thr_once((o), (f))
-#define thr_sigsetmask(f, n, o) __libc_thr_sigsetmask((f), (n), (o))
-#define thr_self() __libc_thr_self()
-#define thr_yield() __libc_thr_yield()
-#define thr_create(tp, ta, f, a) __libc_thr_create((tp), (ta), (f), (a))
-#define thr_exit(v) __libc_thr_exit((v))
-#define thr_errno() __libc_thr_errno()
-#define thr_enabled() (__isthreaded)
-#define thr_setcancelstate(n, o) __libc_thr_setcancelstate((n),(o))
-#endif /* __LIBC_THREAD_STUBS */
-
-#define FLOCKFILE(fp) __flockfile_internal(fp, 1)
-#define FUNLOCKFILE(fp) __funlockfile_internal(fp, 1)
-
-#else /* _REENTRANT */
-
-#define mutex_init(m, a)
-#define mutex_lock(m)
-#define mutex_trylock(m)
-#define mutex_unlock(m)
-#define mutex_destroy(m)
-
-#define cond_init(c, t, a)
-#define cond_signal(c)
-#define cond_broadcast(c)
-#define cond_wait(c, m)
-#define cond_timedwait(c, m, t)
-#define cond_destroy(c)
-
-#define rwlock_init(l, a)
-#define rwlock_rdlock(l)
-#define rwlock_wrlock(l)
-#define rwlock_tryrdlock(l)
-#define rwlock_trywrlock(l)
-#define rwlock_unlock(l)
-#define rwlock_destroy(l)
-
-#define thr_keycreate(k, d)
-#define thr_setspecific(k, p)
-#define thr_getspecific(k)
-#define thr_keydelete(k)
-
-#define thr_once(o, f)
-#define thr_sigsetmask(f, n, o)
-#define thr_self()
-#define thr_errno()
-
-#define FLOCKFILE(fp)
-#define FUNLOCKFILE(fp)
-
-#endif /* _REENTRANT */
diff --git a/StdLibPrivateInternalFiles/License.txt b/StdLibPrivateInternalFiles/License.txt
deleted file mode 100644
index be68999be6..0000000000
--- a/StdLibPrivateInternalFiles/License.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright (c) 2012, Intel Corporation. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-* Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-* Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/StdLibPrivateInternalFiles/ReadMe.txt b/StdLibPrivateInternalFiles/ReadMe.txt
deleted file mode 100644
index 35e3b6a87a..0000000000
--- a/StdLibPrivateInternalFiles/ReadMe.txt
+++ /dev/null
@@ -1,502 +0,0 @@
- EADK
- EDK II Standard Libraries and Applications
- ReadMe
- Version 1.02
- 21 Dec. 2012
-
-
-OVERVIEW
-========
-The EADK (uEfi Application Development Kit) provides a set of standards-based
-libraries, along with utility and demonstration applications, intended to
-ease development of UEFI applications based upon the EDK II Open-Source
-distribution.
-
-At this time, applications developed with the EADK are intended to reside
-on, and be loaded from, storage separate from the core firmware. This is
-primarily due to size and environmental requirements.
-
-This release of the EADK should only be used to produce UEFI Applications. Due to the execution
-environment built by the StdLib component, execution as a UEFI driver can cause system stability
-issues.
-
-This document describes the EDK II specific aspects of installing, building,
-and using the Standard C Library component of the EDK II Application
-Development Kit, EADK.
-
-The EADK is comprised of three packages:
- AppPkg, StdLib, and StdLibPrivateInternalFiles.
-
- AppPkg This package contains applications which demonstrate use of the
- Standard C and Sockets Libraries.
- These applications reside in AppPkg/Applications.
-
- Enquire This is a program that determines many properties of the
- C compiler and the target machine that Enquire is run on. The
- only changes required to port this 1990s era Unix program to
- EDK II were the addition of eight pragmas to enquire.c in
- order to disable some Microsoft VC++ specific warnings.
-
- Hello This is a very simple EDK II native application that doesn't use
- any features of the Standard C Library.
-
- Main This application is functionally identical to Hello, except that
- it uses the Standard C Library to provide a main() entry point.
-
- Python A port of the Python-2.7.2 interpreter for UEFI. Building this
- application is disabled by default.
- See the PythonReadMe.txt file, in the Python directory,
- for information on configuring and building Python.
-
- Sockets A collection of applications demonstrating use of the
- EDK II Socket Libraries. These applications include:
-
- * DataSink * DataSource
- * GetAddrInfo * GetHostByAddr
- * GetHostByDns * GetHostByName
- * GetNetByAddr * GetNetByName
- * GetServByName * GetServByPort
- * OobRx * OobTx
- * RawIp4Rx * RawIp4Tx
- * RecvDgram * SetHostName
- * SetSockOpt * TftpServer
- * WebServer
-
- StdLib The StdLib package contains the standard header files as well as
- implementations of other standards-based libraries.
-
- * BsdSocketLib
- Support routines above the sockets layer and C interface for
- the UEFI socket library.
- * Efi
- Template contents for the target system's
- \Efi\StdLib\etc directory.
- * EfiSocketLib
- UEFI socket implementation, may be linked into an
- application or run as a driver.
- * Include
- Standard include files.
- * LibC
- C Standard Library implementation as per
- ISO/IEC 9899:199409 (C95).
- * PosixLib
- Selected functions from the "Single Unix v4" specification.
- * SocketDxe
- UEFI sockets driver, includes EfiSocketLib.
- * UseSocketDxe
- Alternate linkage for applications that get built into the
- firmware. Cause application to use a common instance of the
- sockets driver instead of including all of sockets into the
- application.
-
- StdLibPrivateInternalFiles The contents of this package are for the
- exclusive use of the library implementations in StdLib. Please do
- not use anything from this package in your application or else
- unexpected behavior may occur.
- This package may be removed in a future release.
-
-
-RELEASE NOTES
-=============
- Fixes and Additions
- -------------------
-Beginning with release 1.01, applications built with the StdLib package
-no longer have a dependency on the TimerLib.
-
- Known Issues
- -----------------
-This release of the EADK has some restrictions, as described below.
-
- 1. The target machine must be running firmware which provides the
- UEFI 2.3 HII protocol.
-
- 2. Applications must be launched from within the EFI Shell.
-
- 3. Absolute file paths may optionally be prefixed by a volume specifier
- such as "FS0:". The volume specifier is separated from the remainder
- of the path by a single colon ':'. The volume specifier must be one of
- the Shell's mapped volume names as shown by the "map" command.
-
- 4. Absolute file paths that don't begin with a volume specifier;
- e.g. paths that begin with "/", are relative to the currently selected
- volume. When the EFI Shell first starts, there is NO selected volume.
-
- 5. The tmpfile(), and related, functions require that the current volume
- have a temporary directory as specified in <paths.h>. This directory
- is specified by macro _PATH_TMP as /Efi/StdLib/tmp.
-
-The Standard C Library provided by this package is a "hosted" implementation
-conforming to the ISO/IEC 9899-1990 C Language Standard with Addendum 1. This
-is commonly referred to as the "C 95" specification or ISO/IEC 9899:199409.
-The following instructions assume that you have an existing EDK II or UDK 2010
-source tree that has been configured to build with your tool chain. For
-convenience, it is assumed that your EDK II source tree is located at
-C:\Source\Edk2.
-
-
-EADK INSTALLATION
-=================
-The EADK is integrated within the EDK II source tree and is included with
-current EDK II check-outs. If they are missing from your tree, they may be
-installed by extracting, downloading or copying them to the root of your EDK II
-source tree. The three package directories should be peers to the Conf,
-MdePkg, Nt32Pkg, etc. directories.
-
-There are some boiler-plate declarations and definitions that need to be
-included in your application's INF and DSC build files. These are described
-in the CONFIGURATION section, below.
-
-A subset of the Python 2.7.2 distribution is included as part of AppPkg. If desired,
-the full Python 2.7.2 distribution may be downloaded from python.org and used instead.
-Delete or rename the existing Python-2.7.2 directory then extract the downloaded
-Python-2.7.2.tgz file into the AppPkg\Applications\Python directory. This will produce a
-Python-2.7.2 directory containing the full Python distribution. Python files that had to be
-modified for EDK II are in the AppPkg\Applications\Python\PyMod-2.7.2 directory. These
-files need to be copied into the corresponding directories within the extracted Python-2.7.2
-directory before Python can be built.
-
-
-BUILDING
-========
-It is not necessary to build the libraries separately from the target
-application(s). If the application references the libraries, as described in
-USAGE, below; the required libraries will be built as needed.
-To build the applications included in AppPkg, one would execute the following
-commands within the "Visual Studio Command Prompt" window:
-
- > cd C:\Source\Edk2
- > .\edksetup.bat
- > build -a X64 -p AppPkg\AppPkg.dsc
-
-This will produce the application executables: Enquire.efi, Hello.efi, and
-Main.efi in the C:\Source\Edk2\Build\AppPkg\DEBUG_VS2008\X64 directory; with
-the DEBUG_VS2008 component being replaced with the actual tool chain and build
-type you have selected in Conf\Tools_def.txt. These executables can now be
-loaded onto the target platform and executed.
-
-If you examine the AppPkg.dsc file, you will notice that the StdLib package is
-referenced in order to resolve the library classes comprising the Standard
-C Library. This, plus referencing the StdLib package in your application's
-.inf file is all that is needed to link your application to the standard
-libraries.
-
-Unless explicitly stated as allowed, EADK components should not be added as
-components of a DSC file which builds a platform's core firmware. There are
-incompatibilities in build flags and requirements that will conflict with the
-requirements of the core firmware. EADK components should be built using a
-separate DSC file then, if absolutely necessary, included as binary components
-of other DSC files.
-
-USAGE
-=====
-This implementation of the Standard C Library is comprised of 16 separate
-libraries in addition to the standard header files. Nine of the libraries are
-associated with use of one of the standard headers; thus, if the header is used
-in an application, it must be linked with the associated library. Three
-libraries are used to provide the Console and File-system device abstractions.
-The libraries and associated header files are described in the following table.
-
- Library
- Class Header File(s) Notes
----------- ---------------- -------------------------------------------------
-LibC -- Use Always -- This library is always required.
-LibCtype ctype.h, wctype.h Character classification and mapping
-LibLocale locale.h Localization types, macros, and functions
-LibMath math.h Mathematical functions, types, and macros
-LibStdio stdio.h Standard Input and Output functions, types, and
- macros
-LibStdLib stdlib.h General Utilities for numeric conversion, random
- num., etc.
-LibString string.h String copying, concatenation, comparison,
- & search
-LibSignal signal.h Functions and types for handling run-time
- conditions
-LibTime time.h Time and Date types, macros, and functions
-LibUefi sys/EfiSysCall.h Provides the UEFI system interface and
- "System Calls"
-LibWchar wchar.h Extended multibyte and wide character utilities
-LibNetUtil Network address and number manipulation utilities
-DevConsole Automatically provided File I/O abstractions for
- the UEFI Console device. No need to list this
- library class in your INF file(s).
-DevShell Add if desired File I/O abstractions using UEFI shell
- facilities. Add this to the application's main
- INF file if file-system access needed.
-DevUtility -- Do Not Use -- Utility functions used internally by the Device abstractions
-LibGdtoa -- Do Not Use -- This library is used internally and should not
- need to be explicitly specified by an
- application. It must be defined as one of the
- available library classes in the application's
- DSC file.
-
- Table 1: Standard Libraries
- ============================
-
-The DevConsole and DevShell libraries provide device I/O functionality and are treated
-specially. DevConsole is automatically included so there is no need to reference it in your
-application's DSC or INF files. DevShell must be listed, in your application's INF file in the
-[LibraryClasses] section, if your application does file I/O.
-
-These libraries must be fully described in the [LibraryClasses] section of the
-application package's DSC file. Then, each individual application needs to
-specify which libraries to link to by specifying the Library Class, from the
-above table, in the [LibraryClasses] section of the application's INF file. The
-AppPkg.dsc, StdLib.dsc, and Enquire.inf files provide good examples of this.
-More details are in the CONFIGURATION section, below.
-
-In order to simplify this process, the [LibraryClasses] definitions, and others, are
-specified in the StdLib.inc file. If this file is included in the DSC file, usually at the
-end, then other DSC file changes or additions are unnecessary. This is further described in
-the CONFIGURATION section, below.
-
-Within the source files of the application, use of the Standard headers and
-library functions follow standard C programming practices as formalized by
-ISO/IEC 9899:1990, with Addendum 1, (C 95) C language specification.
-
-
-BUILD CONFIGURATION
-===================
-DSC Files
----------
-
-All EDK II packages which build applications that use the standard libraries
-must include some "boilerplate" text in the package's .dsc file. To make it
-easier, and to reduce cut-and-paste errors, the "boilerplate" text has been
-consolidated into a single file, StdLib/StdLib.inc, which can be included in
-your .dsc file using the !include directive. The provided AppPkg.dsc and
-StdLib.dsc files do this on their last line.
-
-The "boilerplate" text can be included using a !include directive in the
-package's .dsc file. The provided AppPkg.dsc and StdLib.dsc files include
-the following "boilerplate" text:
-
- ##############################################################################
- #
- # Specify whether we are running in an emulation environment, or not.
- # Define EMULATE if we are, else keep the DEFINE commented out.
- #
- # DEFINE EMULATE = 1
-
- ##############################################################################
- #
- # Include Boilerplate text required for building with the Standard Libraries.
- #
- ##############################################################################
- !include StdLib/StdLib.inc
-
- Figure 1: "Boilerplate" Inclusion
- =================================
-
-The EMULATE macro must be defined if one desires to do source-level debugging within one of
-the emulated environments such as NT32Pkg or UnixPkg.
-
-The final boilerplate line, in Figure 1, includes the StdLib.inc file.
-Each section of StdLib/StdLib.inc is described below.
-
-If desired, all of the Socket applications, in AppPkg, can be built by including Sockets.inc:
-
- !include AppPkg/Applications/Sockets/Sockets.inc
-
- Figure 2: Socket Applications "Boilerplate" Inclusion
- =====================================================
-
-
-Descriptions of the Library Classes comprising the Standard Libraries,
-as shown in Figure 3: Library Class Descriptions, are provided.
-
- [LibraryClasses]
- #
- # C Standard Libraries
- #
- LibC|StdLib/LibC/LibC.inf
- LibCType|StdLib/LibC/Ctype/Ctype.inf
- LibLocale|StdLib/LibC/Locale/Locale.inf
- LibMath|StdLib/LibC/Math/Math.inf
- LibSignal|StdLib/LibC/Signal/Signal.inf
- LibStdio|StdLib/LibC/Stdio/Stdio.inf
- LibStdLib|StdLib/LibC/StdLib/StdLib.inf
- LibString|StdLib/LibC/String/String.inf
- LibTime|StdLib/LibC/Time/Time.inf
- LibUefi|StdLib/LibC/Uefi/Uefi.inf
- LibWchar|StdLib/LibC/Wchar/Wchar.inf
-
- # Common Utilities for Networking Libraries
- LibNetUtil|StdLib/LibC/NetUtil/NetUtil.inf
-
- # Additional libraries for POSIX functionality.
- LibErr|StdLib/PosixLib/Err/LibErr.inf
- LibGen|StdLib/PosixLib/Gen/LibGen.inf
- LibGlob|StdLib/PosixLib/Glob/LibGlob.inf
- LibStringlist|StdLib/PosixLib/Stringlist/LibStringlist.inf
-
- # Libraries for device abstractions within the Standard C Library
- # Applications should not directly access any functions defined in these libraries.
- LibGdtoa|StdLib/LibC/gdtoa/gdtoa.inf
- DevConsole|StdLib/LibC/Uefi/Devices/daConsole.inf
- DevShell|StdLib/LibC/Uefi/Devices/daShell.inf
- DevUtility|StdLib/LibC/Uefi/Devices/daUtility.inf
-
- [LibraryClasses.ARM.UEFI_APPLICATION]
- NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-
- Figure 3: Library Class Descriptions
- ====================================
-
-
-The directives in Figure 4: Package Component Descriptions will create
-instances of the BaseLib and BaseMemoryLib library classes that are built
-with Link-time-Code-Generation disabled. This is necessary when using the
-Microsoft tool chains in order to allow the library's functions to be
-resolved during the second pass of the linker during Link-Time-Code-Generation
-of the application.
-
-A DXE driver version of the Socket library is also built.
-
- [Components]
- # BaseLib and BaseMemoryLib need to be built with the /GL- switch
- # when using the Microsoft tool chains. This is required so that
- # the library functions can be resolved during the second pass of
- # the linker during link-time-code-generation.
- #
- MdePkg/Library/BaseLib/BaseLib.inf {
- <BuildOptions>
- MSFT:*_*_*_CC_FLAGS = /X /Zc:wchar_t /GL-
- }
- MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf {
- <BuildOptions>
- MSFT:*_*_*_CC_FLAGS = /X /Zc:wchar_t /GL-
- }
-
- ##########
- # Socket Layer
- ##########
- StdLib/SocketDxe/SocketDxe.inf
-
- Figure 4: Package Component Descriptions
- ========================================
-
-
-Each compiler assumes, by default, that it will be used with standard libraries
-and headers provided by the compiler vendor. Many of these assumptions are
-incorrect for the UEFI environment. By including a BuildOptions section, as
-shown in Figure 5: Package Build Options, these assumptions can be
-tailored for compatibility with UEFI and the EDK II Standard Libraries.
-
-Note that the set of BuildOptions used is determined by the state of the EMULATE macro.
-
- [BuildOptions]
- !ifndef $(EMULATE)
- # These Build Options are used when building the Standard Libraries to be run
- # on real hardware.
- INTEL:*_*_IA32_CC_FLAGS = /Qfreestanding
- MSFT:*_*_IA32_CC_FLAGS = /X /Zc:wchar_t
- GCC:*_*_IA32_CC_FLAGS = -nostdinc -nostdlib
-
- !else
- # The Build Options, below, are only used when building the Standard Libraries
- # to be run under an emulation environment.
- # They disable optimization which facillitates debugging under the Emulation environment.
- INTEL:*_*_IA32_CC_FLAGS = /Od
- MSFT:*_*_IA32_CC_FLAGS = /Od
- GCC:*_*_IA32_CC_FLAGS = -O0
-
- Figure 5: Package Build Options
- ===============================
-
-
-INF Files
-=========
-The INF files for most modules will not require special directives in order to
-support the Standard Libraries. The two sections which require attention: LibraryClasses
-and BuildOptions, are described below.
-
- [LibraryClasses]
- UefiLib
- LibC
- LibString
- LibStdio
- DevShell
-
- Figure 6: Module Library Classes
- ================================
-
-
-Modules of type UEFI_APPLICATION that perform file I/O must include library
-class DevShell. Including this library class will allow file operations to be
-handled by the UEFI Shell. Without this class, only Console I/O is supported.
-
-
-An application's INF file might need to include a [BuildOptions] section
-specifying additional compiler and linker flags necessary to allow the
-application to be built. Usually, this section is not needed. When building
-code from external sources, though, it may be necessary to disable some
-warnings or enable/disable some compiler features.
-
- [BuildOptions]
- INTEL:*_*_*_CC_FLAGS = /Qdiag-disable:181,186
- MSFT:*_*_*_CC_FLAGS = /Oi- /wd4018 /wd4131
- GCC:*_*_IPF_SYMRENAME_FLAGS = --redefine-syms=Rename.txt
-
- Figure 7: Module Build Options
- ==============================
-
-
-TARGET-SYSTEM INSTALLATION
-==========================
-Applications that use file system features or the Socket library depend upon
-the existence of a specific directory tree structure on the same volume that
-the application was loaded from. This tree structure is described below:
-
- /EFI Root of the UEFI system area.
- |- /Tools Directory containing applications.
- |- /Boot UEFI specified Boot directory.
- |- /StdLib Root of the Standard Libraries sub-tree.
- |- /etc Configuration files used by libraries.
- |- /tmp Temporary files created by tmpfile(), etc.
-
-
-The /Efi/StdLib/etc directory must be manually populated from the StdLib/Efi/etc source
-directory.
-
-IMPLEMENTATION-Specific Features
-================================
-It is very strongly recommended that applications not use the long or
-unsigned long types. The size of these types varies between compilers and is one
-of the less portable aspects of C. Instead, one should use the UEFI defined
-types whenever possible. Use of these types, listed below for reference,
-ensures that the declared objects have unambiguous, explicitly declared, sizes
-and characteristics.
-
- UINT64 INT64 UINT32 INT32 UINT16 CHAR16
- INT16 BOOLEAN UINT8 CHAR8 INT8
- UINTN INTN PHYSICALADDRESS
-
-There are similar types declared in sys/types.h and related files.
-
-The types UINTN and INTN have the native width of the target processor
-architecture. Thus, INTN on IA32 has a width of 32 bits while INTN on X64 and
-IPF has a width of 64 bits.
-
-For maximum portability, data objects intended to hold addresses should be
-declared with type intptr_t or uintptr_t. These types, declared in
-sys/stdint.h, can be used to create objects capable of holding pointers. Note
-that these types will generate different sized objects on different processor
-architectures. If a constant size across all processors and compilers is
-needed, use type PHYSICAL_ADDRESS.
-
-Though not specifically required by the ISO/IEC 9899 standard, this
-implementation of the Standard C Library provides the following system calls
-which are declared in sys/EfiSysCall.h and/or unistd.h.
-
- close creat chmod dup dup2
- fcntl fstat getcwd ioctl isatty
- lseek lstat mkdir open poll
- read rename rmdir stat unlink write
-
-The open function will accept file names of "stdin:", "stdout:", and "stderr:"
-which cause the respective streams specified in the UEFI System Table to be
-opened. Normally, these are associated with the console device. When the
-application is first started, these streams are automatically opened on File
-Descriptors 0, 1, and 2 respectively.
-
- # # #