mirror of https://github.com/acidanthera/audk.git
StdLib: Revise the meaning of several feature macros.
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
This commit is contained in:
parent
c84d88fa7c
commit
5c5e4a12de
|
@ -40,7 +40,7 @@
|
||||||
*/
|
*/
|
||||||
#include <LibConfig.h>
|
#include <LibConfig.h>
|
||||||
|
|
||||||
#ifndef HAVE_SETPROGNAME
|
#ifdef HAVE_SETPROGNAME
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static const char *__progname = NULL;
|
static const char *__progname = NULL;
|
||||||
|
|
|
@ -48,9 +48,9 @@
|
||||||
#include <sys/EfiCdefs.h>
|
#include <sys/EfiCdefs.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#ifndef HAVE_GETTIMEOFDAY
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_GETTIMEOFDAY
|
||||||
/*
|
/*
|
||||||
* Simple gettimeofday that only returns seconds.
|
* Simple gettimeofday that only returns seconds.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -134,14 +134,13 @@ getopt(int argc, char **argv, char *args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ISPATHSEPARATOR(x) ((x == '/') || (x == '\\'))
|
#define ISPATHSEPARATOR(x) ((x == '/') || (x == '\\'))
|
||||||
|
|
||||||
#ifndef HAVE_BASENAME
|
#ifdef HAVE_BASENAME
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
#define PATH_MAX 5000
|
#define PATH_MAX 5000
|
||||||
#endif
|
#endif
|
||||||
|
@ -232,7 +231,7 @@ mkstemp(char *path)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_FFS
|
#ifdef HAVE_FFS
|
||||||
int
|
int
|
||||||
ffs(int x)
|
ffs(int x)
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,16 +36,19 @@
|
||||||
/* Define these if the associated file exists. */
|
/* Define these if the associated file exists. */
|
||||||
//#define HAVE_NBTOOL_CONFIG_H
|
//#define HAVE_NBTOOL_CONFIG_H
|
||||||
|
|
||||||
/* Define these if StdLib provides the functionality as opposed to a "compatibility" library */
|
|
||||||
|
|
||||||
|
/* Define these macros in order to enable the associated functions. */
|
||||||
|
#define HAVE_BASENAME
|
||||||
|
#define HAVE_FFS
|
||||||
|
#define HAVE_GETTIMEOFDAY
|
||||||
|
#define HAVE_DIRNAME
|
||||||
|
#define HAVE_SETPROGNAME 1
|
||||||
|
|
||||||
|
|
||||||
|
/* Define these if StdLib provides the functionality as opposed to a "compatibility" library */
|
||||||
//#define HAVE_GETOPT
|
//#define HAVE_GETOPT
|
||||||
//#define HAVE_BASENAME
|
|
||||||
//#define HAVE_FFS
|
|
||||||
//#define HAVE_GETTIMEOFDAY
|
|
||||||
//#define HAVE_SETPROGNAME 0
|
|
||||||
//#define HAVE_STRLCPY
|
//#define HAVE_STRLCPY
|
||||||
//#define HAVE_STRLCAT
|
//#define HAVE_STRLCAT
|
||||||
//#define HAVE_DIRNAME
|
|
||||||
#define HAVE_MKSTEMP
|
#define HAVE_MKSTEMP
|
||||||
#define HAVE_SNPRINTF
|
#define HAVE_SNPRINTF
|
||||||
#define HAVE_VSNPRINTF
|
#define HAVE_VSNPRINTF
|
||||||
|
|
Loading…
Reference in New Issue