From 5c5e4a12de6b568c1f460b71b6d2399069bf12f1 Mon Sep 17 00:00:00 2001 From: darylm503 Date: Thu, 3 Nov 2011 00:01:24 +0000 Subject: 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 --- StdLib/LibC/StdLib/setprogname.c | 2 +- StdLib/LibC/Time/gettimeofday.c | 2 +- StdLib/LibC/Uefi/compat.c | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'StdLib') diff --git a/StdLib/LibC/StdLib/setprogname.c b/StdLib/LibC/StdLib/setprogname.c index 3f2bc53cd5..24198cb9bb 100644 --- a/StdLib/LibC/StdLib/setprogname.c +++ b/StdLib/LibC/StdLib/setprogname.c @@ -40,7 +40,7 @@ */ #include -#ifndef HAVE_SETPROGNAME +#ifdef HAVE_SETPROGNAME #include static const char *__progname = NULL; diff --git a/StdLib/LibC/Time/gettimeofday.c b/StdLib/LibC/Time/gettimeofday.c index 1de6dfa66f..d54b7bcf7c 100644 --- a/StdLib/LibC/Time/gettimeofday.c +++ b/StdLib/LibC/Time/gettimeofday.c @@ -48,9 +48,9 @@ #include #include #include -#ifndef HAVE_GETTIMEOFDAY +#ifdef HAVE_GETTIMEOFDAY /* * Simple gettimeofday that only returns seconds. */ diff --git a/StdLib/LibC/Uefi/compat.c b/StdLib/LibC/Uefi/compat.c index 8ce4783a6a..251863fb14 100644 --- a/StdLib/LibC/Uefi/compat.c +++ b/StdLib/LibC/Uefi/compat.c @@ -134,16 +134,15 @@ getopt(int argc, char **argv, char *args) } } } - return -1; } #endif #define ISPATHSEPARATOR(x) ((x == '/') || (x == '\\')) -#ifndef HAVE_BASENAME +#ifdef HAVE_BASENAME #ifndef PATH_MAX -#define PATH_MAX 5000 + #define PATH_MAX 5000 #endif char * @@ -232,7 +231,7 @@ mkstemp(char *path) } #endif -#ifndef HAVE_FFS +#ifdef HAVE_FFS int ffs(int x) { -- cgit v1.2.3