提交 2b43ef8f 编写于 作者: R Rich Felker

make sys/param.h not depend on PATH_MAX and NAME_MAX

this is a nonstandard header used only by backwards programs, but for
some reason it's extremely popular. the recent namespace cleanup fixes
broke it, because PATH_MAX and NAME_MAX will not be defined unless an
approriate feature test macro has been defined. moreover, it's too
late to just #define _GNU_SOURCE in param.h, since limits.h may have
already been included.

let's just hard-code standard values and be done with it.
上级 13e84592
......@@ -5,10 +5,10 @@
#define MAXHOSTNAMELEN 64
#undef MAXNAMLEN
#define MAXNAMLEN NAME_MAX
#define MAXNAMLEN 255
#undef MAXPATHLEN
#define MAXPATHLEN PATH_MAX
#define MAXPATHLEN 4096
#include <sys/resource.h>
#include <endian.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册