summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--StdLib/LibC/StdLib/setprogname.c2
-rw-r--r--StdLib/LibC/Time/gettimeofday.c2
-rw-r--r--StdLib/LibC/Uefi/compat.c7
-rw-r--r--StdLibPrivateInternalFiles/Include/LibConfig.h15
4 files changed, 14 insertions, 12 deletions
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 <LibConfig.h>
-#ifndef HAVE_SETPROGNAME
+#ifdef HAVE_SETPROGNAME
#include <string.h>
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 <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/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)
{
diff --git a/StdLibPrivateInternalFiles/Include/LibConfig.h b/StdLibPrivateInternalFiles/Include/LibConfig.h
index d925ac3258..c0299b312c 100644
--- a/StdLibPrivateInternalFiles/Include/LibConfig.h
+++ b/StdLibPrivateInternalFiles/Include/LibConfig.h
@@ -36,16 +36,19 @@
/* Define these if the associated file exists. */
//#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_BASENAME
-//#define HAVE_FFS
-//#define HAVE_GETTIMEOFDAY
-//#define HAVE_SETPROGNAME 0
//#define HAVE_STRLCPY
//#define HAVE_STRLCAT
-//#define HAVE_DIRNAME
#define HAVE_MKSTEMP
#define HAVE_SNPRINTF
#define HAVE_VSNPRINTF