浏览代码

AK: Add AK_OS_GNU_HURD :^)

This is defined when building on GNU/Hurd, the GNU operating system with
the Hurd as its kernel (as it was designed originally, before Linux and
GNU/Linux came to be).

Also, define the corresponding part of User-Agent.
Sergey Bugaev 1 年之前
父节点
当前提交
79431b32b2
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 4 0
      AK/Platform.h
  2. 2 0
      Userland/Libraries/LibWeb/Loader/ResourceLoader.h

+ 4 - 0
AK/Platform.h

@@ -98,6 +98,10 @@
 #    define AK_OS_SOLARIS
 #endif
 
+#if defined(__gnu_hurd__)
+#    define AK_OS_GNU_HURD
+#endif
+
 #if defined(_WIN32) || defined(_WIN64)
 #    define AK_OS_WINDOWS
 #endif

+ 2 - 0
Userland/Libraries/LibWeb/Loader/ResourceLoader.h

@@ -44,6 +44,8 @@ namespace Web {
 #    define OS_STRING "DragonFly"
 #elif defined(AK_OS_SOLARIS)
 #    define OS_STRING "SunOS"
+#elif defined(AK_OS_GNU_HURD)
+#    define OS_STRING "GNU/Hurd"
 #else
 #    error Unknown OS
 #endif