summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-11-30 23:01:34 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-05 14:32:59 -0800
commit8b6a75009746db4b8e2e180210ac097e35136bcd (patch)
tree5cd4c5a6fd94619d1407630a9631068f7ab0ca5b /include
parentd829a7c5cb42c979b58f3547136df5b05d906423 (diff)
Fix gcc warnings about redundant declarations of fallback functions
Ensure ffs, strndup, strlcat, etc. aren't defined by our headers if they're already defined in the system headers. This does export the HAVE_FFS, HAVE_STRNDUP, etc. definitions to drivers, but if you built the Xserver with a libc that had those, and then build the drivers with a less capable libc, you're going to have problems anyway, and this should solve some reported problems with conflicts between our strndup definition and gcc magic for it. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/dix.h2
-rw-r--r--include/xorg-server.h.in21
2 files changed, 23 insertions, 0 deletions
diff --git a/include/dix.h b/include/dix.h
index 34661f3b6..f98c87b04 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -529,7 +529,9 @@ extern _X_EXPORT void
ScreenRestructured (ScreenPtr pScreen);
#endif
+#ifndef HAVE_FFS
extern _X_EXPORT int ffs(int i);
+#endif
/*
diff --git a/include/xorg-server.h.in b/include/xorg-server.h.in
index b10b9949e..8086f32ae 100644
--- a/include/xorg-server.h.in
+++ b/include/xorg-server.h.in
@@ -37,6 +37,27 @@
/* Support SHM */
#undef HAS_SHM
+/* Define to 1 if you have the `ffs' function. */
+#undef HAVE_FFS
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#undef HAVE_STRCASECMP
+
+/* Define to 1 if you have the `strcasestr' function. */
+#undef HAVE_STRCASESTR
+
+/* Define to 1 if you have the `strlcat' function. */
+#undef HAVE_STRLCAT
+
+/* Define to 1 if you have the `strlcpy' function. */
+#undef HAVE_STRLCPY
+
+/* Define to 1 if you have the `strncasecmp' function. */
+#undef HAVE_STRNCASECMP
+
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
/* Support IPv6 for TCP connections */
#undef IPv6