Bug#412927: gpm-1.19.6-19sarge binary incompatibility in wire protocol with gpm-1.20.1

Daniël Mantione daniel.mantione at freepascal.org
Thu Mar 1 09:17:30 CET 2007



Op Thu, 1 Mar 2007, schreef Peter Samuelson:

> 
> [Daniël Mantione]
> > This causes the wire protocol used by gpm servers in Debian to be
> > different from gpm servers in other distributions, therefore causing
> > incorrect behaviour in applications.
> 
> It is after midnight here, so I might be missing something - but when
> would this protocol mismatch ever be visible?  Don't you always run
> libgpm applications on the same machine as the gpm server?  If that
> machine is Debian, both gpm and the libgpm used by your application
> would be using the same patch.
> 
> Can you explain a scenario where binary compatibility between Debian
> and non-Debian systems, for a protocol which never travels across a
> network, becomes an issue?

The Gpm_Event data structure is not just used in the wire protocol, but 
returned to the application. I.e. for a C application:

extern int Gpm_GetEvent(Gpm_Event *);

For a Pascal application:

function gpm_getevent(var event:Tgpm_event):longint;

This means an application compiled using one version of the Gpm_Event data 
structure will not work on a system using another version of the Gpm_Event 
data structure. This means any application compiled on a non-Debian system 
transfered to a Debian system will break.

Further, gpm.h is not really understandable for a Pascal compiler. It 
has its own gpm interface unit. Patching your gpm.h will work for 
C programs only (luckily for Debian that is a majority). That means 
compiling a Pascal program on a Debian system (Free Pascal is included in 
Debian), will cause the program to use the wrong gpm event data 
structure.

Daniël Mantione


More information about the pkg-gpm-devel mailing list