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

@@ -94,6 +94,7 @@
#include <sys/cdefs.h>
#include <sys/featuretest.h>
#include <inttypes.h>
#include <paths.h>
/*
* Data types
*/
@@ -108,27 +109,6 @@ typedef __socklen_t socklen_t;
#undef _BSD_SIZE_T_
#endif
////#if defined(_NETBSD_SOURCE)
////#ifndef _PATH_HEQUIV
////#define _PATH_HEQUIV "/etc/hosts.equiv"
////#endif
#ifndef _PATH_HOSTS
#define _PATH_HOSTS "/etc/hosts"
#endif
#ifndef _PATH_NETWORKS
#define _PATH_NETWORKS "/etc/networks"
#endif
#ifndef _PATH_PROTOCOLS
#define _PATH_PROTOCOLS "/etc/protocols"
#endif
#ifndef _PATH_SERVICES
#define _PATH_SERVICES "/etc/services"
#endif
////#ifndef _PATH_SERVICES_DB
////#define _PATH_SERVICES_DB "/var/db/services.db"
////#endif
////#endif
__BEGIN_DECLS
extern int h_errno;
__END_DECLS
@@ -219,14 +199,11 @@ struct addrinfo {
#define NETDB_INTERNAL -1 /*%< see errno */
#define NETDB_SUCCESS 0 /*%< no problem */
#endif
////#define NO_ADDRESS NO_DATA /* no address, look for MX record */
#define NO_ADDRESS NO_DATA /* no address, look for MX record */
#define HOST_NOT_FOUND 1 /*%< Authoritative Answer Host not found */
#define TRY_AGAIN 2 /*%< Non-Authoritive Host not found, or SERVERFAIL */
#define NO_RECOVERY 3 /*%< Non recoverable errors, FORMERR, REFUSED, NOTIMP */
////#define NO_DATA 4 /*%< Valid name, no data record of requested type */
////#if defined(_NETBSD_SOURCE)
////#define NO_ADDRESS NO_DATA /*%< no address, look for MX record */
////#endif
#define NO_DATA 4 /*%< Valid name, no data record of requested type */
/*
* Error return codes from getaddrinfo()