summaryrefslogtreecommitdiff
path: root/lib/getenv.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-10-06 14:00:40 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-10-06 14:00:40 +0200
commit6e9c41a892ed0e0da326e0278b3221ce3f5713b8 (patch)
tree2e301d871bbeeb44aa57ff9cc070fcf3be484487 /lib/getenv.c
Initial import of sane-backends version 1.0.24-1.2
Diffstat (limited to 'lib/getenv.c')
-rw-r--r--lib/getenv.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/getenv.c b/lib/getenv.c
new file mode 100644
index 0000000..c450659
--- /dev/null
+++ b/lib/getenv.c
@@ -0,0 +1,18 @@
+#include "../include/sane/config.h"
+
+#ifndef HAVE_GETENV
+
+char *
+getenv(const char *name)
+{
+ char *retval = 0;
+#ifdef HAVE_OS2_H
+ if (0 != DosScanEnv (buf, &retval))
+ retval = 0;
+#else
+# error "Missing getenv() on this platform. Please implement."
+#endif
+ return retval;
+}
+
+#endif /* !HAVE_GETENV */