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

@@ -82,7 +82,6 @@ static void
localsub(const time_t * const timep, const long offset, struct tm * const tmp);
clock_t
EFIAPI
__getCPS(void)
{
return gMD->ClocksPerSecond;
@@ -183,7 +182,7 @@ timesub(
/** The clock function determines the processor time used.
@return The clock function returns the implementation<EFBFBD>s best
@return The clock function returns the implementation's best
approximation to the processor time used by the program since the
beginning of an implementation-defined era related only to the
program invocation. To determine the time in seconds, the value
@@ -196,7 +195,6 @@ timesub(
CPU TimeStamp Counter ticks since the appliation started.
**/
clock_t
EFIAPI
clock(void)
{
#ifndef NT32dvm
@@ -213,7 +211,6 @@ clock(void)
/**
**/
double
EFIAPI
difftime(time_t time1, time_t time0)
{
return (double)(time1 - time0);
@@ -429,7 +426,7 @@ time2sub(
return t;
}
static time_t
time_t
time2(struct tm * const tmp, void (* const funcp)(const time_t*, long, struct tm*),
const long offset, int * const okayp)
{
@@ -542,7 +539,6 @@ time1(
represented, the function returns the value (time_t)(-1).
**/
time_t
EFIAPI
mktime(struct tm *timeptr)
{
/* From NetBSD */
@@ -558,14 +554,13 @@ mktime(struct tm *timeptr)
/** The time function determines the current calendar time. The encoding of
the value is unspecified.
@return The time function returns the implementation<EFBFBD>s best approximation
@return The time function returns the implementation's best approximation
to the current calendar time. The value (time_t)(-1) is returned
if the calendar time is not available. If timer is not a null
pointer, the return value is also assigned to the object it
points to.
**/
time_t
EFIAPI
time(time_t *timer)
{
time_t CalTime;
@@ -633,7 +628,6 @@ time(time_t *timer)
@return The asctime function returns a pointer to the string.
**/
char *
EFIAPI
asctime(const struct tm *timeptr)
{
register const char * wn;
@@ -663,7 +657,6 @@ asctime(const struct tm *timeptr)
/**
**/
char *
EFIAPI
ctime(const time_t *timer)
{
return asctime(localtime(timer));
@@ -672,7 +665,7 @@ ctime(const time_t *timer)
/*
** gmtsub is to gmtime as localsub is to localtime.
*/
static void
void
gmtsub(
const time_t * const timep,
const long offset,
@@ -718,7 +711,6 @@ gmtsub(
/**
**/
struct tm *
EFIAPI
gmtime(const time_t *timer)
{
gmtsub(timer, 0L, &gMD->BDTime);
@@ -771,7 +763,6 @@ localsub(const time_t * const timep, const long offset, struct tm * const tmp)
/**
**/
struct tm *
EFIAPI
localtime(const time_t *timer)
{
tzset();