diff options
author | Neil Roberts <neil@linux.intel.com> | 2012-08-07 11:45:29 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2012-08-14 18:55:42 +0100 |
commit | 0c66431df361f6bc054581769f105bcf68c4727f (patch) | |
tree | 511d3074e6effd713c79082e92f9f2abad958ccb /configure.ac | |
parent | 12a1ef72c0b7543178e0470047db5c4d8378de5c (diff) | |
download | cogl-0c66431df361f6bc054581769f105bcf68c4727f.tar.gz |
Add a wrapper for 'memmem'
memmem is a GNU libc extension that works like strstr except that the
size of the needle and the haystack are passed into the function
instead of using null-terminated strings.
This patch adds a wrapper function called 'cogl_util_memmem' so that
we can use this function. There is a configure check and if the
function is not available then a fallback implementation will be used.
Otherwise cogl_util_memmem is just defined to memmem.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 1dd1b0a67f6238e13f7f9253fb03addada0541b7)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e6abb863..d3cc31bd 100644 --- a/configure.ac +++ b/configure.ac @@ -1103,6 +1103,9 @@ dnl The 'ffs' function is part of C99 so it isn't always dnl available. Cogl has a fallback if needed. AC_CHECK_FUNCS([ffs]) +dnl 'memmem' is a GNU extension but we have a simple fallback +AC_CHECK_FUNCS([memmem]) + dnl ================================================================ dnl Platform values dnl ================================================================ |