summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorLibravatar Andreas Ericsson <ae@op5.se>2007-11-10 12:55:48 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-11-11 12:10:35 -0800
commit9e79f00f06a5500b30941e6925adda070504e6cf (patch)
tree16c6e6ce8b4cbe33d845ae2ff0fe9bbd9873800b /compat
parent--format=pretty: avoid calculating expensive expansions twice (diff)
downloadtgif-9e79f00f06a5500b30941e6925adda070504e6cf.tar.xz
Simplify strchrnul() compat code
strchrnul() was introduced in glibc in April 1999 and included in glibc-2.1. Checking for that version means the majority of all git users would get to use the optimized version in glibc. Of the remaining few some might get to use a slightly slower version than necessary but probably not slower than what we have today. Unfortunately, __GLIBC_PREREQ() macro was not available in glibc 2.1.1 which was short lived but already supported strchrnul(). Odd minority users of that library needs to live with our compatibility inline version. Rediffed-against-next-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/strchrnul.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/compat/strchrnul.c b/compat/strchrnul.c
deleted file mode 100644
index 51839feb6e..0000000000
--- a/compat/strchrnul.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "../git-compat-util.h"
-
-char *gitstrchrnul(const char *s, int c)
-{
- while (*s && *s != c)
- s++;
- return (char *)s;
-}