summaryrefslogtreecommitdiff
path: root/lib/posixver.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2004-01-16 07:55:43 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2004-01-16 07:55:43 +0000
commit6ba1261f9596af6a08bbf270e1c18e8ec90be021 (patch)
treeb0081f55485de3f2f279000f522ae9557ae83347 /lib/posixver.c
parent2652a32d3640b6a344adc5797080d8de4ae663a8 (diff)
downloadgnulib-6ba1261f9596af6a08bbf270e1c18e8ec90be021.tar.gz
Merge from coreutils.
Diffstat (limited to 'lib/posixver.c')
-rw-r--r--lib/posixver.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/posixver.c b/lib/posixver.c
index d4761edf96..754d7ac55a 100644
--- a/lib/posixver.c
+++ b/lib/posixver.c
@@ -1,6 +1,6 @@
/* Which POSIX version to conform to, for utilities.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,6 +22,8 @@
# include <config.h>
#endif
+#include "posixver.h"
+
#include <limits.h>
#include <stdlib.h>
@@ -32,13 +34,17 @@
# define _POSIX2_VERSION 0
#endif
+#ifndef DEFAULT_POSIX2_VERSION
+# define DEFAULT_POSIX2_VERSION _POSIX2_VERSION
+#endif
+
/* The POSIX version that utilities should conform to. The default is
specified by the system. */
int
posix2_version (void)
{
- long int v = _POSIX2_VERSION;
+ long int v = DEFAULT_POSIX2_VERSION;
char const *s = getenv ("_POSIX2_VERSION");
if (s && *s)