summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-03-01 23:21:54 +0000
committerTheodore Tso <tytso@mit.edu>1995-03-01 23:21:54 +0000
commit40f298fd2abf636dbc982ed2746444c825b3929c (patch)
tree0d0aaeaf829d76ba5e416bba1c10f3cea0156939
parent26354d13dba06582b856a5b609feaaea92f1b89e (diff)
downloadkrb5-40f298fd2abf636dbc982ed2746444c825b3929c.tar.gz
krb5-40f298fd2abf636dbc982ed2746444c825b3929c.tar.xz
krb5-40f298fd2abf636dbc982ed2746444c825b3929c.zip
Only define labs(x) -> abs(x) if labs() is not defined elsewhere.
(This really shouldn't be here at all, but is the expedient way to deal with lack of labs().) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5047 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/include/krb5/ChangeLog5
-rw-r--r--src/include/krb5/configure.in1
-rw-r--r--src/include/krb5/k5-config.h3
3 files changed, 9 insertions, 0 deletions
diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog
index 97106d1bfc..6bda515af0 100644
--- a/src/include/krb5/ChangeLog
+++ b/src/include/krb5/ChangeLog
@@ -1,5 +1,10 @@
Wed Mar 1 17:45:13 1995 Theodore Y. Ts'o <tytso@dcl>
+ * configure.in, k5-config.h: Only define labs(x) -> abs(x) if
+ labs() is not defined elsewhere. (This really shouldn't
+ be here at all, but is the expedient way to deal with lack
+ of labs().)
+
* Makefile.in: Change config.h -> k5-config.h and free.h ->
k5-free.h to reflect renamed header files for Mac/PC port.
diff --git a/src/include/krb5/configure.in b/src/include/krb5/configure.in
index 0c284d0da2..7182e2f54c 100644
--- a/src/include/krb5/configure.in
+++ b/src/include/krb5/configure.in
@@ -8,6 +8,7 @@ AC_PROG_LEX
AC_PROG_INSTALL
HAVE_YYLINENO
AC_FUNC_CHECK(strdup,AC_DEFINE(HAS_STRDUP))
+AC_FUNC_CHECK(labs,AC_DEFINE(HAS_LABS))
CHECK_DIRENT
CHECK_FCNTL
CHECK_WAIT_TYPE
diff --git a/src/include/krb5/k5-config.h b/src/include/krb5/k5-config.h
index 3f03ddae8c..90244c569d 100644
--- a/src/include/krb5/k5-config.h
+++ b/src/include/krb5/k5-config.h
@@ -129,7 +129,10 @@ typedef unsigned char u_char;
#define INTERFACE
#define INTERFACE_C
#define FAR
+
+#ifndef HAS_LABS
#define labs(x) abs(x)
+#endif
#endif /* __windows__ */