Add Socket Libraries.

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
This commit is contained in:
darylm503
2011-07-30 00:30:44 +00:00
parent f766dd76fd
commit d7ce700605
199 changed files with 36115 additions and 686 deletions

View File

@@ -42,6 +42,8 @@
NetBSD: _wcstoul.h,v 1.3 2005/11/29 03:11:59 christos Exp
*/
#include <Library/BaseLib.h>
/*
* function template for wcstoul, wcstoull and wcstoumax.
*
@@ -102,8 +104,8 @@ _FUNCNAME(
/*
* See strtoul for comments as to the logic used.
*/
cutoff = __wUINT_MAX / (__wUINT)base;
cutlim = (int)(__wUINT_MAX % (__wUINT)base);
cutoff = (__wUINT)DivU64x32 ((UINT64) __wUINT_MAX, (UINT32) base);
cutlim = (int) ModU64x32 ((UINT64) __wUINT_MAX, (UINT32) base);
for (acc = 0, any = 0;; wc = (wint_t) *s++) {
i = __wctoint((wchar_t)wc);
if (i == -1) {