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

@ -91,7 +91,7 @@ __BEGIN_DECLS
@sa signal.h
**/
void abort(void);
void abort(void) __noreturn;
/** The atexit function registers the function pointed to by func, to be
called without arguments at normal program termination.
@ -122,6 +122,10 @@ int atexit(void (*)(void));
status is zero, or EXIT_SUCCESS, status is returned unchanged. If the value
of status is EXIT_FAILURE, EAPPLICATION is returned.
Otherwise, status is returned unchanged.
While this function does not return, it can NOT be marked as "__noreturn"
without causing a warning to be emitted because the compilers can not
determine that the function truly does not return.
**/
void exit(int status) __noreturn;
@ -140,7 +144,7 @@ void exit(int status) __noreturn;
The status returned to the host environment is determined in the same way
as for the exit function.
**/
void _Exit(int status);
void _Exit(int status) __noreturn;
/** The getenv function searches an environment list, provided by the host
environment, for a string that matches the string pointed to by name. The
@ -641,6 +645,42 @@ size_t mbstowcs(wchar_t * __restrict dest, const char * __restrict src, size_t
**/
size_t wcstombs(char * __restrict dest, const wchar_t * __restrict src, size_t limit);
/**
The realpath() function shall derive, from the pathname pointed to by
file_name, an absolute pathname that names the same file, whose resolution
does not involve '.', '..', or symbolic links. The generated pathname shall
be stored as a null-terminated string, up to a maximum of {PATH_MAX} bytes,
in the buffer pointed to by resolved_name.
If resolved_name is a null pointer, the behavior of realpath() is
implementation-defined.
@param[in] file_name The filename to convert.
@param[in,out] resolved_name The resultant name.
@retval NULL An error occured.
@return resolved_name.
**/
char * realpath(char *file_name, char *resolved_name);
/**
The getprogname() function returns the name of the program. If the name
has not been set yet, it will return NULL.
@retval The name of the program.
@retval NULL The name has not been set.
**/
const char * getprogname(void);
/**
The setprogname() function sets the name of the program.
@param[in] The name of the program. This memory must be retained
by the caller until no calls to "getprogname" will be
called.
**/
void setprogname(const char *progname);
__END_DECLS
#endif /* _STDLIB_H */