summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEgbert Eich <eich@suse.com>2014-02-12 09:03:27 +0100
committerEgbert Eich <eich@suse.com>2014-02-14 00:13:14 +0100
commit710ec7a47d90778bd419c75f5bc9b391664f6670 (patch)
treeeb955c3ee7f88839a5086b99e45f51068f22efcb /test
parent1c163bd2ef9689897fab728ede96b6baafc0d597 (diff)
downloadxf86-input-wacom-710ec7a47d90778bd419c75f5bc9b391664f6670.tar.gz
Fix loads of 'redundand declaration' warnings in test suite
Most symbols in fake-symbols.h were already declared in the Xserver header files from the SDK which are also included. These produce loads of compiler warnings. The few remaining ones can be added by including xf86_OSproc.h and exevents.h. Then then all function declarations for the stub functions can be deleted. Relying on SDK provided headers makes providing stub functions cumbersome due to frequent non-atomic API/ABI changes. To work around this one would have to avoid SDK headers completely, though. Signed-off-by: Egbert Eich <eich@suse.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r--test/fake-symbols.c31
-rw-r--r--test/fake-symbols.h198
2 files changed, 31 insertions, 198 deletions
diff --git a/test/fake-symbols.c b/test/fake-symbols.c
index c5eac4a..05d0b24 100644
--- a/test/fake-symbols.c
+++ b/test/fake-symbols.c
@@ -26,7 +26,7 @@ xf86WaitForInput (int fd, int timeout)
}
_X_EXPORT int
-xf86OpenSerial (pointer options)
+xf86OpenSerial (OPTTYPE options)
{
return 0;
}
@@ -61,7 +61,7 @@ xf86AddNewOption(OPTTYPE head, const char *name, const char *val)
return NULL;
}
-_X_EXPORT void
+_X_EXPORT void
xf86OptionListFree(OPTTYPE opt)
{
return;
@@ -116,7 +116,7 @@ xf86RemoveEnabledDevice(InputInfoPtr pInfo)
}
_X_EXPORT Atom
-XIGetKnownProperty(char *name)
+XIGetKnownProperty(CONST char *name)
{
return None;
}
@@ -222,12 +222,24 @@ InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels,
return FALSE;
}
+
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 14
+_X_EXPORT Bool
+InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label,
+ int minval, int maxval, int resolution,
+ int min_res, int max_res, int mode)
+{
+ return TRUE;
+}
+#else
_X_EXPORT void
-InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval,
- int resolution, int min_res, int max_res, int mode)
+InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label,
+ int minval, int maxval, int resolution,
+ int min_res, int max_res, int mode)
{
return;
}
+#endif
_X_EXPORT void
xf86PostKeyboardEvent(DeviceIntPtr device,
@@ -267,7 +279,14 @@ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
_X_EXPORT int
XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
int format, int mode, unsigned long len,
- pointer value, Bool sendevent)
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 16
+ const void *
+#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 12
+ const pointer
+#else
+ pointer
+#endif
+ value, Bool sendevent)
{
return 0;
}
diff --git a/test/fake-symbols.h b/test/fake-symbols.h
index 6ef5607..2b92ecc 100644
--- a/test/fake-symbols.h
+++ b/test/fake-symbols.h
@@ -1,5 +1,11 @@
#include <xorg-server.h>
+#include <dix.h>
+#include <os.h>
+#include <exevents.h>
+#include <Xprintf.h>
+#include <xf86.h>
#include <xf86Xinput.h>
+#include <xf86_OSproc.h>
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14
#define OPTTYPE XF86OptionPtr
@@ -8,195 +14,3 @@
#define OPTTYPE pointer
#define CONST
#endif
-
-extern int xf86ReadSerial (int fd, void *buf, int count);
-extern int xf86WriteSerial (int fd, const void *buf, int count);
-extern int xf86CloseSerial (int fd);
-extern int xf86WaitForInput (int fd, int timeout);
-extern int xf86OpenSerial (pointer options);
-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 void xf86OptionListFree(OPTTYPE optlist);
-extern char* xf86OptionName(OPTTYPE opt);
-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, CONST char *deflt);
-extern int xf86CheckBoolOption(OPTTYPE list, const char *name, int deflt);
-
-
-extern char * xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt);
-extern int xf86SetBoolOption(OPTTYPE optlist, const char *name, int deflt);
-extern char *xf86OptionValue(OPTTYPE opt);
-extern void xf86AddEnabledDevice(InputInfoPtr pInfo);
-extern void xf86RemoveEnabledDevice(InputInfoPtr pInfo);
-extern Atom XIGetKnownProperty(char *name);
-extern void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags);
-extern int
-xf86ScaleAxis(int Cx,
- int to_max,
- int to_min,
- int from_max,
- int from_min );
-
-extern void DeleteInputDeviceRequest(DeviceIntPtr pDev);
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
-extern void FreeInputAttributes(InputAttributes *attrs);
-#endif
-extern void
-xf86PostButtonEvent(DeviceIntPtr device,
- int is_absolute,
- int button,
- int is_down,
- int first_valuator,
- int num_valuators,
- ...);
-extern int Xasprintf(char ** ret, const char *format, ...);
-extern int
-XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable);
-
-extern InputInfoPtr xf86FirstLocalDevice(void);
-extern void xf86DeleteInput(InputInfoPtr pInp, int flags);
-extern OPTTYPE xf86OptionListDuplicate(OPTTYPE options);
-extern Bool
-InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels,
- CARD8 *map);
-extern void
-InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval,
- int resolution, int min_res, int max_res, int mode);
-extern void
-xf86PostKeyboardEvent(DeviceIntPtr device,
- unsigned int key_code,
- int is_down);
-extern int
-xf86SetIntOption(OPTTYPE optlist, const char *name, int deflt);
-extern void
-xf86PostButtonEventP(DeviceIntPtr device,
- int is_absolute,
- int button,
- int is_down,
- int first_valuator,
- int num_valuators,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
- const
-#endif
- int *valuators);
-extern Bool
-InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc);
-
-extern int
-XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
- int format, int mode, unsigned long len,
- pointer value, Bool sendevent);
-extern CARD32 GetTimeInMillis (void);
-
-extern int
-NewInputDeviceRequest (InputOption *options,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
- InputAttributes *attrs,
-#endif
- DeviceIntPtr *pdev);
-
-extern Bool
-InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc);
-
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
-extern InputAttributes* DuplicateInputAttributes(InputAttributes *attrs);
-#endif
-extern int ValidAtom(Atom atom);
-extern Bool
-InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
- BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func);
-extern long
-XIRegisterPropertyHandler(DeviceIntPtr dev,
- int (*SetProperty) (DeviceIntPtr dev,
- Atom property,
- XIPropertyValuePtr prop,
- BOOL checkonly),
- int (*GetProperty) (DeviceIntPtr dev,
- Atom property),
- int (*DeleteProperty) (DeviceIntPtr dev,
- Atom property));
-extern int InitProximityClassDeviceStruct(DeviceIntPtr dev);
-extern void LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...);
-extern void xf86MsgVerb(MessageType type, int verb, const char *format, ...);
-extern void xf86Msg(MessageType type, const char *format, ...);
-
-extern void
-xf86PostMotionEventP(DeviceIntPtr device,
- int is_absolute,
- int first_valuator,
- int num_valuators,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
- const
-#endif
- int *valuators);
-
-extern Bool
-InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
- int numMotionEvents, int mode);
-
-extern OPTTYPE
-xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char* val);
-
-extern OPTTYPE xf86NextOption(OPTTYPE list);
-
-extern int
-XIGetDeviceProperty (DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value);
-
-extern Atom MakeAtom(const char *string, unsigned len, Bool makeit);
-
-extern int GetMotionHistorySize(void);
-
-extern void
-xf86PostProximityEventP(DeviceIntPtr device,
- int is_in,
- int first_valuator,
- int num_valuators,
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
- const
-#endif
- int *valuators);
-
-extern Bool InitFocusClassDeviceStruct(DeviceIntPtr dev);
-
-
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
-extern void
-xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer list);
-
-extern void
-xf86CollectInputOptions(InputInfoPtr pInfo,
- const char **defaultOpts,
- pointer extraOpts);
-
-extern InputInfoPtr
-xf86AllocateInput(InputDriverPtr drv, int flags);
-
-
-extern ClientPtr serverClient;
-
-extern Bool QueueWorkProc (
- Bool (*function)(ClientPtr /* pClient */, pointer /* closure */),
- ClientPtr client, pointer closure);
-
-#endif
-
-extern OsTimerPtr
-TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
- OsTimerCallback func, pointer arg);
-
-extern void TimerFree(OsTimerPtr timer);
-
-extern int xf86BlockSIGIO (void);
-extern void xf86UnblockSIGIO (int wasset);
-
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 16
-extern Bool InitTouchClassDeviceStruct(DeviceIntPtr device, unsigned int max_touches,
- unsigned int mode, unsigned int numAxes);
-extern ValuatorMask *valuator_mask_new(int num_valuators);
-extern void valuator_mask_set(ValuatorMask *mask, int valuator, int data);
-extern void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t type,
- uint32_t flags, const ValuatorMask *mask);
-#endif