summaryrefslogtreecommitdiff
path: root/getconf
diff options
context:
space:
mode:
Diffstat (limited to 'getconf')
-rw-r--r--getconf/getconf.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/getconf/getconf.c b/getconf/getconf.c
index 5a9da22..a9eefa5 100644
--- a/getconf/getconf.c
+++ b/getconf/getconf.c
@@ -1,6 +1,6 @@
/*
* getconf - get important system configuration values from the shell.
- * Copyright (c) 2016 Adélie Linux Team. All rights reserved.
+ * Copyright (c) 2016-2024 Adélie Linux Team. All rights reserved.
* Licensed under the NCSA open source license.
* See LICENSE file included with this source for more information.
*/
@@ -30,6 +30,7 @@ typedef struct variable_mapping
#define SHIMMY_POSIX2_LINE_MAX 0x7FEEDFED
#define SHIMMY_INT_MAX 0x7FEEDFEC
+#define SHIMMY_LONG_BIT 0x7FEEDFEB
const var_map_t sysconf_vars[] = {
/* max */
@@ -333,7 +334,10 @@ const var_map_t sysconf_vars[] = {
#endif
{ "POSIX2_LINE_MAX", SHIMMY_POSIX2_LINE_MAX },
- { "INT_MAX", SHIMMY_INT_MAX }
+ { "INT_MAX", SHIMMY_INT_MAX },
+#if defined(__LONG_WIDTH__)
+ { "LONG_BIT", SHIMMY_LONG_BIT }
+#endif
};
@@ -454,6 +458,11 @@ int do_system_var(char *environment, char *system_var)
case SHIMMY_INT_MAX:
val = INT_MAX;
break;
+#if defined(__LONG_WIDTH__)
+ case SHIMMY_LONG_BIT:
+ val = __LONG_WIDTH__;
+ break;
+#endif
default:
errno = 0;