summaryrefslogtreecommitdiffstats
path: root/StdLib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix read issue detected by the following Python program. The issue was that ↵lpleahy2012-03-052-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* StdLib, AppPkg: Update ReadMe files.darylm5032012-02-281-119/+167
| | | | | | | | | | 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
* StdLib/Include/paths.h: Update paths to reflect new base of \Efi\StdLib.darylm5032012-02-271-83/+29
| | | | | | | | | (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
* Fix issues detected by python web-server.lpleahy2012-02-248-56/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * StdLib.dsc was changed to always build the sockets code.lpleahy2012-02-1713-23/+31
| | | | | | | | | | | | | * 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
* Bug fix: CreateEvent sometimes returning EFI_INVALID_PARAMETER due to bad ↵lpleahy2012-02-151-1/+1
| | | | | | | | | 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
* Change to match the tree required on the storage device.lpleahy2012-02-136-0/+0
| | | | | | Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13008 6f19259b-4bc3-4df7-8a09-765794883524
* Fix some errors detected by the GCC 4.4 compiler.lpleahy2012-02-1010-42/+13
| | | | | | Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13006 6f19259b-4bc3-4df7-8a09-765794883524
* Merged socket development branch:lpleahy2012-02-0919-25/+6551
| | | | | | | | | | | | * 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
* StdLib: Fix compiler compatibility issues:darylm5032012-02-012-105/+130
| | | | | | | | | | | | 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
* StdLib/Include/netdb.h: Re-enable macros needed by socket applications and ↵darylm5032012-01-261-198/+129
| | | | | | | | | | 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
* StdLib: Add a file was missed and should have been included in check-in 12061.darylm5032012-01-061-0/+132
| | | | | | | Signed-off-by: darylm503 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12916 6f19259b-4bc3-4df7-8a09-765794883524
* StdLib: Add isDirSep character classification macro and function. Implement ↵darylm5032011-11-3040-423/+1019
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* StdLib: Correct module type and [LibraryClasses] section.darylm5032011-11-114-8/+8
| | | | | | | | 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
* StdLib: Eliminate TimerLib dependencies.darylm5032011-11-115-76/+36
| | | | | | | | | | | 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
* StdLib: Fix some corrupted comments and inconsistent indentation.darylm5032011-11-032-43/+40
| | | | | | | | 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
* StdLib: Move the declarations for ffs() and bzero() from extern.h to strings.h.darylm5032011-11-032-2/+57
| | | | | | | | 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
* StdLib: Make the vfscanf function public.darylm5032011-11-031-1/+1
| | | | | | | | 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
* StdLib: Revise the meaning of several feature macros.darylm5032011-11-033-6/+5
| | | | | | | | | | 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
* StdLib: Fix dirent structure members to be of the correct type.darylm5032011-11-021-4/+11
| | | | | | | | | | 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
* StdLib: Remove files obsoleted by changelist 12649.darylm5032011-11-022-158/+0
| | | | | | | | | | 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
* StdLib: Add directory access functions to PosixLib.darylm5032011-11-0213-17/+512
| | | | | | | | | | | | | | | | | | | | 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
* The three TscTimerLib has been merged to one directory.lzeng142011-11-011-2/+2
| | | | | | Signed-off-by: lzeng14 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12621 6f19259b-4bc3-4df7-8a09-765794883524
* StdLib: Fix strcmp so that comparisons are case sensitive. Simplified code ↵darylm5032011-11-011-26/+14
| | | | | | | | | | | 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
* StdLib: Improve robustness of stat() and make basename() a public function.darylm5032011-10-036-15/+22
| | | | | | | | | | | 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
* Fix compilation errors detected with GCC 4.4lpleahy2011-09-304-34/+37
| | | | | | Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12504 6f19259b-4bc3-4df7-8a09-765794883524
* Update the sockets library codelpleahy2011-09-3040-6584/+8756
| | | | | | | | | | * 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
* StdLib: Change the last argument of the ioctl helper functions to va_list* ↵darylm5032011-09-165-65/+69
| | | | | | | | | | | | | 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
* StdLib: Patches and updates for ARM.darylm5032011-09-1617-105/+843
| | | | | | | | | | | | | 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
* StdLib/LibC: Fix transcription error from submitted patch.darylm5032011-09-111-1/+1
| | | | | | | | 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
* StdLib|LibC: Implement the sleep() function.darylm5032011-09-112-15/+16
| | | | | | | | | | 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
* StdLib: Replace some non-ASCII characters with ASCII equivalents.darylm5032011-09-083-9/+9
| | | | | | | | 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
* StdLib: Fix build errors caused by differences between the minGW 4.3 and GCC ↵darylm5032011-09-014-25/+58
| | | | | | | | | | | | | | | | 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
* Fix GCC build errors.darylm5032011-08-315-11/+21
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12240 6f19259b-4bc3-4df7-8a09-765794883524
* Fix mismatch between the declaration and definition of fwrite.darylm5032011-08-181-4/+4
| | | | | | | 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
* Re-enable the declaration for ftello.darylm5032011-08-181-1/+1
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12155 6f19259b-4bc3-4df7-8a09-765794883524
* Update or add comments to files and functions for use by Doxygen.darylm5032011-08-177-569/+2443
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12153 6f19259b-4bc3-4df7-8a09-765794883524
* Update or add comments to files and functions for use by Doxygen.darylm5032011-08-1511-714/+1746
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12139 6f19259b-4bc3-4df7-8a09-765794883524
* Better handle transmit errorslpleahy2011-08-082-224/+251
| | | | | | | 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
* Remove SocketPkg referenceslpleahy2011-08-082-2/+0
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12096 6f19259b-4bc3-4df7-8a09-765794883524
* Fix @return Doxygen commands to be singular instead of plural.darylm5032011-08-0520-73/+73
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12094 6f19259b-4bc3-4df7-8a09-765794883524
* Update or add comments to files and functions for use by Doxygen.darylm5032011-08-058-131/+193
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12093 6f19259b-4bc3-4df7-8a09-765794883524
* Get rid of some rcsid blocks. The EDK II build options cause a build break ↵darylm5032011-08-054-246/+241
| | | | | | | | | 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
* Update or add comments to files and functions for use by Doxygen.darylm5032011-08-0411-194/+253
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12090 6f19259b-4bc3-4df7-8a09-765794883524
* Update or add comments to files and functions for use by Doxygen.darylm5032011-08-049-203/+436
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12089 6f19259b-4bc3-4df7-8a09-765794883524
* Fix send to properly wait while long transmits are in progresslpleahy2011-08-032-49/+3
| | | | git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12083 6f19259b-4bc3-4df7-8a09-765794883524
* Add plain-text ReadMe files and delete the PDF version.darylm5032011-08-024-6/+448
| | | | | | | Clean up some comments. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12080 6f19259b-4bc3-4df7-8a09-765794883524
* Fix GCC build breaks.darylm5032011-08-024-7/+5
| | | | | | | | | Fix case mismatch for includes of "Socket.h". Original code was <socket.h> while file was Socket.h in the same directory as the .c file. Add EFIAPI to function declarations so that they match the definition. Remove "ineffective" statements from stub functions. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12076 6f19259b-4bc3-4df7-8a09-765794883524
* fix typojcarsey2011-08-011-1/+1
| | | | | | submitted-by: jcarsey git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12070 6f19259b-4bc3-4df7-8a09-765794883524
* Add Socket Libraries.darylm5032011-07-30199-686/+36115
| | | | | | | | | | | | | | | Add Posix functions for porting compatibility. Fix compliance issues with ISO/IEC 9899:199409 New Functions: setenv(), fparseln(), GetFileNameFromPath(), rename(), realpath(), setprogname(), getprogname(), strlcat(), strlcpy(), strsep(), setitimer(), getitimer(), timegm(), getopt(), basename(), mkstemp(), ffs(), vsnprintf(), snprintf(), getpass(), usleep(), select(), writev(), strcasecmp(), getcwd(), chdir(), tcgetpgrp(), getpgrp(), gettimeofday(), bcopy(), git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12061 6f19259b-4bc3-4df7-8a09-765794883524