diff options
Diffstat (limited to 'libc/pwd_grp')
-rw-r--r-- | libc/pwd_grp/config.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/libc/pwd_grp/config.h b/libc/pwd_grp/config.h index 2c3c6c3f0..860f7dee9 100644 --- a/libc/pwd_grp/config.h +++ b/libc/pwd_grp/config.h @@ -22,6 +22,7 @@ #ifndef _CONFIG_GRP_H #define _CONFIG_GRP_H +#include <features.h> #include <pwd.h> #include <grp.h> #include <shadow.h> @@ -39,7 +40,7 @@ extern int __sgetspent_r(const char * string, struct spwd * spwd, #define PWD_BUFFER_SIZE 256 - + /* * Define GR_SCALE_DYNAMIC if you want grp to dynamically scale its read buffer * so that lines of any length can be used. On very very small systems, @@ -48,7 +49,20 @@ extern int __sgetspent_r(const char * string, struct spwd * spwd, * On larger systems, you will want to define this, because grp will _not_ * deal with long lines gracefully (they will be skipped). */ +/* + * Define GR_DYNAMIC_GROUP_LIST to make initgroups() dynamically allocate + * space for it's GID array before calling setgroups(). This is probably + * unnecessary scalage, so it's undefined by default. + */ +#ifdef __UCLIBC_HAS_MMU__ +#define GR_SCALE_DYNAMIC 1 +#define GR_DYNAMIC_GROUP_LIST 1 +#else #undef GR_SCALE_DYNAMIC +#undef GR_DYNAMIC_GROUP_LIST +#endif + + #ifndef GR_SCALE_DYNAMIC /* @@ -64,13 +78,6 @@ extern int __sgetspent_r(const char * string, struct spwd * spwd, #endif /* !GR_SCALE_DYNAMIC */ -/* - * Define GR_DYNAMIC_GROUP_LIST to make initgroups() dynamically allocate - * space for it's GID array before calling setgroups(). This is probably - * unnecessary scalage, so it's undefined by default. - */ -#undef GR_DYNAMIC_GROUP_LIST - #ifndef GR_DYNAMIC_GROUP_LIST /* * GR_MAX_GROUPS is the size of the static array initgroups() uses for |