summaryrefslogtreecommitdiff
path: root/edk2/StdLib/LibC
diff options
context:
space:
mode:
authordarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-03 00:01:24 +0000
committerdarylm503 <darylm503@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-03 00:01:24 +0000
commit9ce0a021aad6f0b80e1c77fc7ffff58a87ac02d3 (patch)
tree173536e5badeba09babe0154dc7d2031cf3c610f /edk2/StdLib/LibC
parentace27dd86f437f0a64c938b21616c710ccc958be (diff)
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@12652 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edk2/StdLib/LibC')
-rw-r--r--edk2/StdLib/LibC/StdLib/setprogname.c2
-rw-r--r--edk2/StdLib/LibC/Time/gettimeofday.c2
-rw-r--r--edk2/StdLib/LibC/Uefi/compat.c7
3 files changed, 5 insertions, 6 deletions
diff --git a/edk2/StdLib/LibC/StdLib/setprogname.c b/edk2/StdLib/LibC/StdLib/setprogname.c
index 3f2bc53cd..24198cb9b 100644
--- a/edk2/StdLib/LibC/StdLib/setprogname.c
+++ b/edk2/StdLib/LibC/StdLib/setprogname.c
@@ -40,7 +40,7 @@
*/
#include <LibConfig.h>
-#ifndef HAVE_SETPROGNAME
+#ifdef HAVE_SETPROGNAME
#include <string.h>
static const char *__progname = NULL;
diff --git a/edk2/StdLib/LibC/Time/gettimeofday.c b/edk2/StdLib/LibC/Time/gettimeofday.c
index 1de6dfa66..d54b7bcf7 100644
--- a/edk2/StdLib/LibC/Time/gettimeofday.c
+++ b/edk2/StdLib/LibC/Time/gettimeofday.c
@@ -48,9 +48,9 @@
#include <sys/EfiCdefs.h>
#include <sys/time.h>
#include <time.h>
-#ifndef HAVE_GETTIMEOFDAY
+#ifdef HAVE_GETTIMEOFDAY
/*
* Simple gettimeofday that only returns seconds.
*/
diff --git a/edk2/StdLib/LibC/Uefi/compat.c b/edk2/StdLib/LibC/Uefi/compat.c
index 8ce4783a6..251863fb1 100644
--- a/edk2/StdLib/LibC/Uefi/compat.c
+++ b/edk2/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)
{