]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Add llabs() implementation. V_7_5_P1
authorDarren Tucker <dtucker@zip.com.au>
Mon, 20 Mar 2017 02:38:27 +0000 (13:38 +1100)
committerDarren Tucker <dtucker@zip.com.au>
Mon, 20 Mar 2017 02:39:27 +0000 (13:39 +1100)
configure.ac
openbsd-compat/bsd-misc.c
openbsd-compat/bsd-misc.h

index f5c1bea02b1ce0e594823922c46f92ea7ef6ca75..c2878e3d441515c59e43dc71dd86c564bbab40a4 100644 (file)
@@ -1717,6 +1717,7 @@ AC_CHECK_FUNCS([ \
        inet_ntoa \
        inet_ntop \
        innetgr \
+       llabs \
        login_getcapbool \
        md5_crypt \
        memmove \
index 6f3bc8f1d4f079fd183a46d8458b13bc56b8dacd..cfd73260ae1870f2b83c39cf367c2ce480cf71bf 100644 (file)
@@ -301,3 +301,11 @@ mbtowc(wchar_t *pwc, const char *s, size_t n)
        return 1;
 }
 #endif
+
+#ifndef HAVE_LLABS
+long long
+llabs(long long j)
+{
+       return (j < 0 ? -j : j);
+}
+#endif
index 6f08b09faaa6b4bc335987e8e6209becc2337046..70a538f04e2d62fa0c4d40d19417aeb79776cc79 100644 (file)
@@ -135,4 +135,8 @@ void errx(int, const char *, ...) __attribute__((format(printf, 2, 3)));
 void warn(const char *, ...) __attribute__((format(printf, 1, 2)));
 #endif
 
+#ifndef HAVE_LLABS
+long long llabs(long long);
+#endif
+
 #endif /* _BSD_MISC_H */