summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-11-19 05:04:58 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-11-19 05:04:58 -0600
commit4142385d87e3ba93cf47aaf7b22ea469169f78da (patch)
tree266b4c4d3733bd8556355e572afd73dd2dd25ccc
parentbe5e7cab7922efd9eff2b9fb1208923931467fc5 (diff)
downloadshimmy-current.tar.gz
shimmy-current.tar.bz2
shimmy-current.tar.xz
shimmy-current.zip
getconf: Add LONG_BIT variableHEADcurrent
This is needed for GNU compatibility, specifically for the elfutils package from sourceware.
-rw-r--r--CHANGELOG.rst12
-rw-r--r--LICENSE2
-rw-r--r--README.rst2
-rw-r--r--getconf/getconf.c13
4 files changed, 24 insertions, 5 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 1e4cdb3..632e166 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -5,7 +5,17 @@
* **A. Wilcox**, documentation writer
* **Contributors**, code
:Copyright:
- © 2016-2022 Adélie Linux and contributors.
+ © 2016-2024 Adélie Linux and contributors.
+
+
+
+0.8 (2024-11-19)
+================
+
+getconf(1)
+----------
+
+* Add `LONG_BIT` variable for compatibility with elfutils.
diff --git a/LICENSE b/LICENSE
index 6634e99..4259c6d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2016-2022 Adélie Linux Team.
+Copyright (c) 2016-2024 Adélie Linux Team.
All rights reserved.
Developed by: Adélie Linux Team
diff --git a/README.rst b/README.rst
index 601b124..d4828ca 100644
--- a/README.rst
+++ b/README.rst
@@ -6,7 +6,7 @@
:Status:
Beta
:Copyright:
- © 2016-2022 Adélie Linux Team. NCSA open source licence.
+ © 2016-2024 Adélie Linux Team. NCSA open source licence.
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;