Initial support for GNU/Hurd.

Identify the platform as "hurd", and make use of stuff already used for Linux or *BSD when possible.
The location of the premake binary (premake_locate) is not implemented, since there is currently no way to do that on GNU/Hurd.
This commit is contained in:
Pino Toscano 2013-04-19 23:00:47 +02:00
parent b35e57d52b
commit cf9fb335b7
4 changed files with 9 additions and 2 deletions

View File

@ -54,7 +54,7 @@
configuration "windows"
links { "ole32" }
configuration "linux or bsd"
configuration "linux or bsd or hurd"
defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" }
links { "m" }
linkoptions { "-rdynamic" }
@ -62,6 +62,9 @@
configuration "linux"
links { "dl" }
configuration "hurd"
links { "dl" }
configuration "macosx"
defines { "LUA_USE_MACOSX" }
links { "CoreServices.framework" }

View File

@ -54,6 +54,7 @@
{ "aix", "IBM AIX" },
{ "bsd", "OpenBSD, NetBSD, or FreeBSD" },
{ "haiku", "Haiku" },
{ "hurd", "GNU/Hurd" },
{ "linux", "Linux" },
{ "macosx", "Apple Mac OS X" },
{ "solaris", "Solaris" },

View File

@ -218,7 +218,7 @@ void getversion(struct OsVersionInfo* info)
/*************************************************************/
#elif defined(PLATFORM_BSD) || defined(PLATFORM_LINUX) || defined(PLATFORM_SOLARIS)
#elif defined(PLATFORM_BSD) || defined(PLATFORM_LINUX) || defined(PLATFORM_SOLARIS) || defined(PLATFORM_HURD)
#include <string.h>
#include <sys/utsname.h>

View File

@ -30,6 +30,9 @@
#elif defined (_AIX)
#define PLATFORM_AIX (1)
#define PLATFORM_STRING "aix"
#elif defined (__GNU__)
#define PLATFORM_HURD (1)
#define PLATFORM_STRING "hurd"
#else
#define PLATFORM_WINDOWS (1)
#define PLATFORM_STRING "windows"