Bug#224757: X11/extensions/Xinerama.h missing extern C

2003-12-27 Thread Branden Robinson
On Sun, Dec 21, 2003 at 08:10:47PM -0800, Matt Zimmerman wrote:
 On Mon, Dec 22, 2003 at 01:34:17PM +1100, Daniel Stone wrote:
 
  #ifdef __cplusplus
  extern C {
  #endif
  
  [...]
  
  #ifdef __cplusplus
  }
  #endif
 
 There seem to be macros in place for this already, in Xfuncproto.h:
 
 #ifndef _XFUNCPROTOBEGIN
 #if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
 #define _XFUNCPROTOBEGIN extern C {   /* do not leave open across includes 
 */
 #define _XFUNCPROTOEND }
 #else
 #define _XFUNCPROTOBEGIN
 #define _XFUNCPROTOEND
 #endif
 #endif /* _XFUNCPROTOBEGIN */
 
 The other headers wrap their declarations in these macros.

Someone please come up with a proper patch, and this'll get fixed faster.

-- 
G. Branden Robinson| That's the saving grace of humor:
Debian GNU/Linux   | if you fail, no one is laughing at
[EMAIL PROTECTED] | you.
http://people.debian.org/~branden/ | -- A. Whitney Brown


signature.asc
Description: Digital signature


Bug#224757: X11/extensions/Xinerama.h missing extern C

2003-12-22 Thread Matt Zimmerman
On Mon, Dec 22, 2003 at 01:34:17PM +1100, Daniel Stone wrote:

 #ifdef __cplusplus
 extern C {
 #endif
 
 [...]
 
 #ifdef __cplusplus
 }
 #endif

There seem to be macros in place for this already, in Xfuncproto.h:

#ifndef _XFUNCPROTOBEGIN
#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */
#define _XFUNCPROTOBEGIN extern C {   /* do not leave open across includes */
#define _XFUNCPROTOEND }
#else
#define _XFUNCPROTOBEGIN
#define _XFUNCPROTOEND
#endif
#endif /* _XFUNCPROTOBEGIN */

The other headers wrap their declarations in these macros.

-- 
 - mdz




Bug#224757: X11/extensions/Xinerama.h missing extern C

2003-12-21 Thread Matt Zimmerman
Package: xlibs-dev
Version: 4.2.1-14
Severity: normal

I'm not certain where it's supposed to come from, but there should be an
extern C in there somewhere if magic C++ compiler macro is defined.
Currently, this header is unusable in C++ programs.

mizar:[/tmp] cat test.cc
#include X11/extensions/Xinerama.h

int main() {
XineramaQueryExtension(NULL,NULL,NULL);
return 0;
}
mizar:[/tmp] gcc -x c++ -o test test.cc -L/usr/X11R6/lib -lXinerama -lX11
-lXext
/tmp/cci2yPT9.o(.text+0x28): In function `main':
: undefined reference to `XineramaQueryExtension(_XDisplay*, int*, int*)'
/tmp/cci2yPT9.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0'
collect2: ld returned 1 exit status
zsh: exit 1 gcc -x c++ -o test test.cc -L/usr/X11R6/lib -lXinerama -lX11
-lXext
mizar:[/tmp] gcc -x c -o test test.cc -L/usr/X11R6/lib -lXinerama -lX11
-lXext
mizar:[/tmp]


-- System Information:
Debian Release: unstable
Architecture: i386
Kernel: Linux mizar 2.4.21-evms2.1.0-skas-3 #1 Thu Jul 17 09:01:34 EDT 2003 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages xlibs-dev depends on:
ii  libc6-dev [libc-dev]2.3.2.ds1-10 GNU C Library: Development Librari
ii  xlibs   4.2.1-14 X Window System client libraries

-- no debconf information


-- 
 - mdz




Bug#224757: X11/extensions/Xinerama.h missing extern C

2003-12-21 Thread Daniel Stone
On Sun, Dec 21, 2003 at 03:01:01PM -0800, Matt Zimmerman wrote:
 I'm not certain where it's supposed to come from, but there should be an
 extern C in there somewhere if magic C++ compiler macro is defined.
 Currently, this header is unusable in C++ programs.
 
 mizar:[/tmp] cat test.cc
 #include X11/extensions/Xinerama.h
 
 int main() {
 XineramaQueryExtension(NULL,NULL,NULL);
 return 0;
 }
 mizar:[/tmp] gcc -x c++ -o test test.cc -L/usr/X11R6/lib -lXinerama -lX11
 -lXext
 /tmp/cci2yPT9.o(.text+0x28): In function `main':
 : undefined reference to `XineramaQueryExtension(_XDisplay*, int*, int*)'
 /tmp/cci2yPT9.o(.eh_frame+0x11): undefined reference to
 `__gxx_personality_v0'
 collect2: ld returned 1 exit status
 zsh: exit 1 gcc -x c++ -o test test.cc -L/usr/X11R6/lib -lXinerama -lX11
 -lXext
 mizar:[/tmp] gcc -x c -o test test.cc -L/usr/X11R6/lib -lXinerama -lX11
 -lXext
 mizar:[/tmp]

You're right. This is an idea I vetoed, only to be smacked down because
I was wrong.

#ifdef __cplusplus
extern C {
#endif

[...]

#ifdef __cplusplus
}
#endif

:) d

-- 
Daniel Stone[EMAIL PROTECTED]
Debian X Strike Force:http://people.debian.org/~branden/xsf/


pgpZ0Rz2jg9vs.pgp
Description: PGP signature