Commit cae314d6 authored by Ruslan Sayfutdinov's avatar Ruslan Sayfutdinov Committed by Facebook GitHub Bot

define HOST_NAME_MAX for Windows and Mac

Summary:
This page says it can't be greater than 256:
https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-gethostname

POSIX one is equal to 255, so set it to 255.

Reviewed By: yfeldblum

Differential Revision: D27370716

fbshipit-source-id: 458ebc02d2914a0422862fafedd089e0c13c5e6d
parent 0be01410
......@@ -24,6 +24,7 @@
#if __has_include(<crt_externs.h>)
#include <crt_externs.h> // @manual
#endif
#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
#endif
extern "C" {
......@@ -36,6 +37,7 @@ extern "C" {
#define PATH_MAX _MAX_PATH
#define MAXPATHLEN _MAX_PATH
#define NAME_MAX _MAX_FNAME
#define HOST_NAME_MAX 255
char* mktemp(char* tn);
char* mkdtemp(char* tn);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment