summaryrefslogtreecommitdiff
path: root/StdLib
AgeCommit message (Collapse)Author
2012-04-24Update copyright formathhtian
Signed-off-by: Hot Tian <hot.tian@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13213 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-11EDK II Packages: Add Contributions.txt and License.txt filesjljusten
Contributions.txt documents the contribution process for all tianocore projects. The conents of Contributions.txt should match in all cases. License.txt is a per-project document showing the license terms used by that project. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13187 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-29StdLib: Add STDC macros, for MSFT compilers, to improve compatibility with ↵darylm503
various Open-Source software packages. Defines __STDC__, __STDC_VERSION__, and __STDC_HOSTED as specified by ISO/IEC 9899. Signed-off-by: daryl.mcdaniel@intel.com Reviewed-by: jordan.l.justen@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13153 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-28StdLib/Include/stdarg.h: Added the __va_copy macro for Python compatibility.darylm503
AppPkg/Applications/Python: Deleted obsolete and incomplete PyMod-2.7.1. Changes to enable compilation using GCC 4.4 on both Windows and Linux hosts. Signed-off-by: daryl.mcdaniel@intel.com Reviewed-by: jaben.carsey@intel.com git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13147 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-24EADK (StdLib, AppPkg, StdLibPrivateInternalFiles): Python Beta Release.darylm503
Clean up and clearly differentiate required and optional items in configuration files. Enable the system command and synchronize configuration options between all CPU architectures. Replace the UEFI_ENV macro with UEFI_C_SOURCE to align with Linux and Posix conventions. Update copyrights and versions and make minor cosmetic enhancements to files. Fix compiler-specific build errors. Add Python-specific ReadMe file. Signed-off-by: darylm503 Reviewed-by: geekboy15a Reviewed-by: jljusten Reviewed-by: leegrosenbaum git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13119 6f19259b-4bc3-4df7-8a09-765794883524
2012-03-05Fix read issue detected by the following Python program. The issue was that ↵lpleahy
the caller's buffer pointer was not being advanced between segments of the read data. Signed-off-by: lpleahy ----- UnbufferedRead.py ----- import httplib conn = httplib.HTTPConnection("10.241.97.30") conn.request('GET', '/') resp = conn.getresponse(buffering=True) if resp.status != 200: print "status:", resp.status print "aborting" sys.exit(1) while True: chunk = resp.read() if not chunk: break print chunk git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13077 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-28StdLib, AppPkg: Update ReadMe files.darylm503
Signed-off-by: darylm503 Reviewed-by: jcarsey Reviewed-by: michaelkrau Reviewed-by: laurie0131 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13046 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-27StdLib/Include/paths.h: Update paths to reflect new base of \Efi\StdLib.darylm503
(file missed from previous commit) Signed-off-by: darylm503 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13045 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-24Fix issues detected by python web-server.lpleahy
* Removed display of TPL * Added NOP implementation for SO_REUSEADDR * Add better detection of socket address * Return first address Signed-off-by: lpleahy Python Web server below: --------------- import sys import BaseHTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler HandlerClass = SimpleHTTPRequestHandler ServerClass = BaseHTTPServer.HTTPServer Protocol = "HTTP/1.0" port = 80 server_address = ('', port) HandlerClass.protocol_version = Protocol httpd = ServerClass(server_address, HandlerClass) sa = httpd.socket.getsockname() print "Serving HTTP on", sa[0], "port", sa[1], "..." httpd.serve_forever() git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13034 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-17* StdLib.dsc was changed to always build the sockets code.lpleahy
* Fix errors detected by the GCC compiler (pointer conversions and format mismatches). * Worked around a GCC flow analysis issue in base64.c where the compiler is convinced that there is a path through the code where "input" is used but not initialized. * Added EFIAPI to the file system operation routines for sockets to match the API declaration. Note for GCC, the meaning of "l" and "L" are different in printf and sscanf format strings. The lower case "l" indicates a 32-bit value where the capital "L" indicates a 64-bit value. The native (default) integer size may be represented by a size letter of "n". Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13023 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-15Bug fix: CreateEvent sometimes returning EFI_INVALID_PARAMETER due to bad ↵lpleahy
TPL value. Use known good TPL value since TPL is a don't care. Found, reviewed and tested by: Duane Voth Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13017 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-13Change to match the tree required on the storage device.lpleahy
Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13008 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-10Fix some errors detected by the GCC 4.4 compiler.lpleahy
Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13006 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-09Merged socket development branch:lpleahy
* Fixed bug report (Duane Voth: Python sockets test application not working) by starting the receive operations when a connection is established! * Increased performance by extending the idle loop into the network stack with the Poll call. * Added support for TCPv6 (SOCK_STREAM) and UDPv6 (SOCK_DGRAM). * Added support for getaddrinfo and getnameinfo calls. * Moved application PCD values into AppPkg Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13002 6f19259b-4bc3-4df7-8a09-765794883524
2012-02-01StdLib: Fix compiler compatibility issues:darylm503
tcp.h: Fix packed structure syntax. cdefs.h is not included so the existing __packed attribute was not properly expanded. Non-GCC compilers were also not handled correctly. Changing to the pack(n) pragma is compatible between all supported compilers. SysCalls.c: The utimes() function has a fixed number of arguments and calls a function that takes a va_list argument. GCC will not allow the va_start, etc., macros to be used in a function with a fixed number of arguments, even though that is valid C. The workaround was to create a worker function for utimes() that takes a variable number of arguments. The worker function then uses the va_* macros. Signed-off-by: darylm503 Reviewed-by: leegrosenbaum git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12977 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-26StdLib/Include/netdb.h: Re-enable macros needed by socket applications and ↵darylm503
perform general cleanup. Signed-off-by: darylm503 Reviewed-by: jcarsey git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12956 6f19259b-4bc3-4df7-8a09-765794883524
2012-01-06StdLib: Add a file was missed and should have been included in check-in 12061.darylm503
Signed-off-by: darylm503 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12916 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-30StdLib: Add isDirSep character classification macro and function. Implement ↵darylm503
several Posix functions and clean up EfiSysCall.h. Align file mode handling with UEFI file protocol flags. Include/ctype.h: Function declaration and Macro definition of isDirSep Include/unistd.h: Declarations added from EfiSysCall.h Include/utime.h: New file. For the Posix utime() function. Include/sys/_ctype.h: Update character class bit maps. Include/sys/EfiSysCall.h: Move declarations to unistd.h Include/sys/fcntl.h: Improve comments. Add UEFI-specific macros. Include/sys/filio.h: Remove declarations for unsupported file ioctls. Include/sys/stat.h: Fix flags. Add macros and declarations. Include/sys/time.h: Add declarations for new functions Tm2Efi() and Time2Efi(). Include/sys/types.h: Use EFI-specific instead of BSD-specific definitions for typedefs. Include/sys/unistd.h: Delete inappropriate content. Guard macro definitions. LibC/Locale/setlocale.c LibC/Stdio/{fdopen.c, findfp.c, fopen.c, freopen.c, gettemp.c, makebuf.c, mktemp.c, remove.c, stdio.c, tempnam.c, tmpfile.c, tmpnam.c} LibC/Time/{itimer.c, ZoneProc.c} LibC/Uefi/SysCalls.c LibC/Uefi/Devices/Console/daConsole.c LibC/Uefi/Devices/UefiShell/daShell.c PosixLib/Gen/readdir.c Include unistd.h instead of EfiSysCall.h LibC/Ctype/CClass.c: Character classification function implementation for isDirSep. LibC/Ctype/iCtype.c: Update character classification and case conversion tables. LibC/Time/TimeEfi.c: Improve comments. Implement new functions Tm2Efi() and Time2Efi(). LibC/Uefi/StubFunctions.c: Add missing include. Cosmetic changes to declarations. LibC/Uefi/SysCalls.c: Add support function for utime(). LibC/Uefi/Uefi.inf: Add LibGen library class dependency. LibC/Uefi/Xform.c: Enhance Omode2EFI(). LibC/Uefi/Devices/UefiShell/daShell.c: Enhance da_ShellMkdir. Implement da_ShellIoctl to set file times. PosixLib/Gen/access.c: New file. Implement the access() function. PosixLib/Gen/dirname.c: Enhance to use isDirSep and differentiate between the device, path, and filename components of UEFI Shell-style paths. PosixLib/Gen/utime.c: New file. Implement the utime() function. PosixLib/Gen/LibGen.inf: Change MODULE_TYPE. Add new files. Signed-off-by: darylm503 Reviewed-by: geekboy15a Reviewed-by: jljusten Reviewed-by: Rahul Khana Reviewed-by: leegrosenbaum git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12800 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-11StdLib: Correct module type and [LibraryClasses] section.darylm503
Signed-off-by: darylm503 Reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12684 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-11StdLib: Eliminate TimerLib dependencies.darylm503
Implement the clock() function using the EFI time-of-day clock instead of a TimerLib instance. Signed-off-by: darylm503 Reviewed-by: jljusten Reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12683 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-03StdLib: Fix some corrupted comments and inconsistent indentation.darylm503
Signed-off-by: darylm503 Reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12655 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-03StdLib: Move the declarations for ffs() and bzero() from extern.h to strings.h.darylm503
Signed-off-by: darylm503 Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12654 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-03StdLib: Make the vfscanf function public.darylm503
Signed-off-by: darylm503 Reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12653 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-03StdLib: Revise the meaning of several feature macros.darylm503
Feature macros, defined in StdLibPrivateInternalFiles/Include/LibConfig.h are defined to cause the named feature to be included. When originally added, several features were guarded using reversed logic. Signed-off-by: darylm503 Reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12652 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-02StdLib: Fix dirent structure members to be of the correct type.darylm503
The type of the time values in a UEFI directory entry are EFI_TIME, not timeval. Signed-off-by: darylm503 Reviewed-by: lgrosenb git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12651 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-02StdLib: Remove files obsoleted by changelist 12649.darylm503
Signed-off-by: darylm503 Reviewed-by: lgrosenb Reviewed-by: lpleahy Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12650 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-02StdLib: Add directory access functions to PosixLib.darylm503
Update <dirent.h> and <sys/dirent.h> to latest version. Enable the tempnam function. Fix assignments within predicate expressions so that it is clear where assignment is intended and where comparison occurs. Remove internal.h and DirFunctions.c with its non-portable opendir, closedir, and readdir functions. Add modified versions of the NetBSD opendir, closedir, and readdir functions. Fix the declaration of stat() to be standards compliant and consistent with code. Clean up indentation and declarations of non-existent objects. Signed-off-by: darylm503 Reviewed-by: lgrosenb Reviewed-by: lpleahy Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12649 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-01The three TscTimerLib has been merged to one directory.lzeng14
Signed-off-by: lzeng14 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12621 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-01StdLib: Fix strcmp so that comparisons are case sensitive. Simplified code ↵darylm503
for strcasecmp. Signed-off-by: darylm503 Reviewed-by: jljusten Reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12620 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-03StdLib: Improve robustness of stat() and make basename() a public function.darylm503
AppPkg: Refinements to pyconfig.h and port of getpath.c to EDK II. Signed-off-by: darylm503 Reviewed-by: geekboy15a Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12508 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-30Fix compilation errors detected with GCC 4.4lpleahy
Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12504 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-30Update the sockets library codelpleahy
* Passes conformance and functional tests. * Builds with GCC 4.4 compiler. Signed-off by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12497 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-16StdLib: Change the last argument of the ioctl helper functions to va_list* ↵darylm503
from void*. Functions which call these helper functions always pass the last parameter as a va_list argument. Add a conditional block around a MSFT-only pragma so that stringlist.c will compile with GCC. Comment-out the Socket Library components within StdLib.dsc. These components are still in development. Signed-off-by: darylm503 Reviewed by: geekboy15A git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12369 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-16StdLib: Patches and updates for ARM.darylm503
Add ARMGCC and RVCT toolchain support. Update and Add ARM specific machine headers. Set the empty macro for __warn_references(). Make __flt_rounds() return 'Round to nearest' by default on ARM. Signed-off-by: Olivier Martin [olivier.martin@arm.com] Reviewed-by: darylm503 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12367 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-11StdLib/LibC: Fix transcription error from submitted patch.darylm503
Signed-off-by: duanev@gmail.com Reviewed-by: darylm503 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12324 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-11StdLib|LibC: Implement the sleep() function.darylm503
Implement the sleep() function and make both sleep() and usleep() public. Required initially for Python, but these functions have general applicability. Signed-off-by: duanev@gmail.com Reviewed-by: darylm503 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12323 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-08StdLib: Replace some non-ASCII characters with ASCII equivalents.darylm503
Signed-off-by: darylm503 Reviewed-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12302 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-01StdLib: Fix build errors caused by differences between the minGW 4.3 and GCC ↵darylm503
4.4 compilers. There are several significant differences between the mingw32 (gcc 4.3.0 based) compiler and the GCC 4.4 and later compilers. Mingw32 requires that types int, long, long long, unsigned { int, long, long long}, float, and double be the only types passed to va_arg(). This requires the programmer to ensure that va_arg is called with type int for arguments of any type with a size less-than or equal-to int. GCC 4.4 and later does not require this and performs the appropriate promotions for you. Mingw32 uses 32-bit long in both ia32 and x64 mode. GCC 4.4 makes long a 64-bit value when in x64 mode. Signed-off-by: darylm503 Reviewed-by: jcarsey git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12258 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-31Fix GCC build errors.darylm503
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12240 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-18Fix mismatch between the declaration and definition of fwrite.darylm503
The first parameter should be const void * instead of void *. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12157 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-18Re-enable the declaration for ftello.darylm503
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12155 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-17Update or add comments to files and functions for use by Doxygen.darylm503
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12153 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-15Update or add comments to files and functions for use by Doxygen.darylm503
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12139 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-08Better handle transmit errorslpleahy
Return 0 receive bytes when socket is closed git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12099 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-08Remove SocketPkg referenceslpleahy
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12096 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-05Fix @return Doxygen commands to be singular instead of plural.darylm503
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12094 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-05Update or add comments to files and functions for use by Doxygen.darylm503
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12093 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-05Get rid of some rcsid blocks. The EDK II build options cause a build break ↵darylm503
on the rcsid definitions. It is easier to delete them than other workarounds. Fix case mismatch for an included file. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12092 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-04Update or add comments to files and functions for use by Doxygen.darylm503
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12090 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-04Update or add comments to files and functions for use by Doxygen.darylm503
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12089 6f19259b-4bc3-4df7-8a09-765794883524