summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-12-19 13:01:35 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-12-20 11:15:37 +1000
commitd54d936146fa58fb10a1b6839e1413671f96f86e (patch)
tree72b7f91390a1af3264e1eab35598f9f8fb554503
parent388c2630881d74b10bcd0aad57796c9e09341471 (diff)
test: add more #defines to fix build issues.
sigh, upstream changed the option function prototypes without bumping the ABI. This is the best we can do, though there will be a period between the actual abi bump and this commit where we get test build errors now. commit 09e4b78f7944234865f4648940453303af0c2663 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon Nov 7 19:19:47 2011 -0800 Fix gcc -Wwrite-strings warnings in xf86 ddx Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com>
-rw-r--r--test/fake-symbols.c4
-rw-r--r--test/fake-symbols.h6
2 files changed, 6 insertions, 4 deletions
diff --git a/test/fake-symbols.c b/test/fake-symbols.c
index 85daef3..e25dd34 100644
--- a/test/fake-symbols.c
+++ b/test/fake-symbols.c
@@ -44,7 +44,7 @@ xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val)
}
_X_EXPORT char *
-xf86SetStrOption(OPTTYPE optlist, const char *name, char *deflt)
+xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt)
{
return NULL;
}
@@ -60,7 +60,7 @@ xf86AddNewOption(OPTTYPE head, const char *name, const char *val)
{
return NULL;
}
-_X_EXPORT char *
+_X_EXPORT CONST char *
xf86FindOptionValue(OPTTYPE options, const char *name)
{
return NULL;
diff --git a/test/fake-symbols.h b/test/fake-symbols.h
index 9b85eac..a145021 100644
--- a/test/fake-symbols.h
+++ b/test/fake-symbols.h
@@ -3,8 +3,10 @@
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14
#define OPTTYPE XF86OptionPtr
+#define CONST const
#else
#define OPTTYPE pointer
+#define CONST
#endif
extern int xf86ReadSerial (int fd, void *buf, int count);
@@ -17,12 +19,12 @@ extern int xf86SetSerialSpeed (int fd, int speed);
extern OPTTYPE xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val);
extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, const char *val);
extern char* xf86OptionName(OPTTYPE opt);
-extern char* xf86FindOptionValue(OPTTYPE options, const char *name);
+extern CONST char* xf86FindOptionValue(OPTTYPE options, const char *name);
extern int xf86NameCmp(const char *s1, const char *s2);
extern char* xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt);
-extern char * xf86SetStrOption(OPTTYPE optlist, const char *name, char *deflt);
+extern char * xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt);
extern int xf86SetBoolOption(OPTTYPE optlist, const char *name, int deflt);
extern OPTTYPE xf86AddNewOption(OPTTYPE head, const char *name, const char *val);
extern char* xf86OptionName(OPTTYPE opt);