From 40f298fd2abf636dbc982ed2746444c825b3929c Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 1 Mar 1995 23:21:54 +0000 Subject: [PATCH] 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 --- src/include/krb5/ChangeLog | 5 +++++ src/include/krb5/configure.in | 1 + src/include/krb5/k5-config.h | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/include/krb5/ChangeLog b/src/include/krb5/ChangeLog index 97106d1bf..6bda515af 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 + * 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 0c284d0da..7182e2f54 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 3f03ddae8..90244c569 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__ */ -- 2.26.2