On Wed, Feb 12, 2014 at 11:00 AM, Egbert Eich <e...@freedesktop.org> wrote: > From: Egbert Eich <e...@suse.com> > > A lot of symbols in fake-symbols.h are already declared in the > Xserver header files from the SDK which are also included. > These produce loads of compiler warnings. > The types in fake-symbols.c should be checked against the types > from the SDK rather than against the types from fake-symbols.h > to make sure they match and haven't changed. > Instead of deleting the redundant declarations they are now > shielded by #ifdef [header_define] ... #endif. > [header_define] is the define from the header file to avoid > duplicate inclusion. > > Signed-off-by: Egbert Eich <e...@suse.com> > --- Any reason for the handful of function definitions left un-guarded? It looks like you only need to add blocks for exevents.h and xf86_OSproc.h to cover everything.
Jason --- Now instead of four in the eights place / you’ve got three, ‘Cause you added one / (That is to say, eight) to the two, / But you can’t take seven from three, / So you look at the sixty-fours.... > test/fake-symbols.h | 182 > ++++++++++++++++++++++++++++------------------------ > 1 file changed, 99 insertions(+), 83 deletions(-) > > diff --git a/test/fake-symbols.h b/test/fake-symbols.h > index 6ef5607..699a2f2 100644 > --- a/test/fake-symbols.h > +++ b/test/fake-symbols.h > @@ -1,4 +1,5 @@ > #include <xorg-server.h> > +#include <xf86.h> > #include <xf86Xinput.h> > > #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14 > @@ -16,6 +17,8 @@ extern int xf86WaitForInput (int fd, int timeout); > extern int xf86OpenSerial (pointer options); > extern int xf86SetSerialSpeed (int fd, int speed); > > +/* in xf86Opt.h already */ > +#ifndef _XF86_OPT_H_ > 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); > @@ -29,9 +32,19 @@ 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 OPTTYPE xf86OptionListDuplicate(OPTTYPE options); > +extern int > +xf86SetIntOption(OPTTYPE optlist, const char *name, int deflt); > +extern OPTTYPE > +xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char* val); > + > +extern OPTTYPE xf86NextOption(OPTTYPE list); > +#endif /* _XF86_OPT_H_ */ > + > +/* in xf86Xinput.h already */ > +#ifndef _xf86Xinput_h > 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, > @@ -39,11 +52,6 @@ xf86ScaleAxis(int Cx, > 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, > @@ -52,25 +60,12 @@ xf86PostButtonEvent(DeviceIntPtr device, > 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, > @@ -82,32 +77,101 @@ xf86PostButtonEventP(DeviceIntPtr device, > const > #endif > int *valuators); > +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 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); > +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 16 > +extern void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t > type, > + uint32_t flags, const ValuatorMask *mask); > +#endif > +#endif /* _xf86Xinput_h */ > + > +extern Atom XIGetKnownProperty(char *name); > +/* in input.h already */ > +#ifndef INPUT_H > +extern void DeleteInputDeviceRequest(DeviceIntPtr pDev); > +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11 > +extern void FreeInputAttributes(InputAttributes *attrs); > +#endif > +extern Bool > +InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels, > + CARD8 *map); > 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 Bool > +InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, > + int numMotionEvents, int mode); > +extern int GetMotionHistorySize(void); > +extern Bool InitFocusClassDeviceStruct(DeviceIntPtr dev); > +#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); > +#endif > +extern Bool > +InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr > controlProc); > +#endif /* INPUT_H */ > + > +/* in Xprintf.h already */ > +#ifndef XPRINTF_H > +extern int Xasprintf(char ** ret, const char *format, ...); > +#endif /* XPRINTF_H */ > + > +extern int > +XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool > deletable); > + > +extern void > +InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, > int maxval, > + int resolution, int min_res, int max_res, int mode); > +extern int > +XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, > + int format, int mode, unsigned long len, > + pointer value, Bool sendevent); > +/* in os.h already */ > +#ifndef OS_H > +extern void LogMessageVerbSigSafe(MessageType type, int verb, const char > *format, ...); > +extern CARD32 GetTimeInMillis (void); > +extern OsTimerPtr > +TimerSet(OsTimerPtr timer, int flags, CARD32 millis, > + OsTimerCallback func, pointer arg); > +extern void TimerFree(OsTimerPtr timer); > +#endif /* OS_H */ > + > + > +/* in dix.h already */ > +#ifndef DIX_H > +extern int ValidAtom(Atom atom); > +extern Atom MakeAtom(const char *string, unsigned len, Bool makeit); > +#endif /* DIX_H */ > + > extern long > XIRegisterPropertyHandler(DeviceIntPtr dev, > int (*SetProperty) (DeviceIntPtr dev, > @@ -119,49 +183,16 @@ XIRegisterPropertyHandler(DeviceIntPtr dev, > int (*DeleteProperty) (DeviceIntPtr dev, > Atom property)); > extern int InitProximityClassDeviceStruct(DeviceIntPtr dev); > -extern void LogMessageVerbSigSafe(MessageType type, int verb, const char > *format, ...); > + > +/* in xf86.h already */ > +#ifndef _XF86_H > 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); > +#endif /* _XF86_H */ > > 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); > @@ -174,7 +205,6 @@ xf86CollectInputOptions(InputInfoPtr pInfo, > extern InputInfoPtr > xf86AllocateInput(InputDriverPtr drv, int flags); > > - > extern ClientPtr serverClient; > > extern Bool QueueWorkProc ( > @@ -183,20 +213,6 @@ extern Bool QueueWorkProc ( > > #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 > -- > 1.8.1.4 > > > ------------------------------------------------------------------------------ > Android apps run on BlackBerry 10 > Introducing the new BlackBerry 10.2.1 Runtime for Android apps. > Now with support for Jelly Bean, Bluetooth, Mapview and more. > Get your Android app in front of a whole new audience. Start now. > http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk > _______________________________________________ > Linuxwacom-devel mailing list > Linuxwacom-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel