bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnulib and C++


From: John W. Eaton
Subject: gnulib and C++
Date: Thu, 18 Feb 2010 14:37:30 -0500

Hi,

I'm trying to use gnulib with GNU Octave and am overall very pleased,
as it is allowing me to remove a lot of cruft from Octave's source
files and just assume that a POSIX environment is available without
having to use a lot of #ifdefs.  To me, that's a significant
improvement.

However, there is one issue that has caused a bit of trouble as I
have started using more gnulib modules.

Octave is mostly written in C++ and am having some difficulty with the
rpl_ redefinitions of symbols that have been used as member function
names in the Octave sources.  For example, in a header file, we might
have

  class foo
  {
  public:
    ...
    int open (some, args);
    ...
  };

and then in the corresponding source file,

  #include <fcntl.h>

  int foo::open (some, args) { ... }

Any file that includes foo.h sees a declaration for foo::open,
but on systems where gnulib's fcntl.h header redefines open to be
rpl_open, linking will fail because the compiler generates code for
foo::rpl_open instead of foo::open.

Since I'm doing my development work on a GNU/Linux system that doesn't
need a lot of gnulib functions enabled, I don't see these problems
until they are reported by people working on systems that need more
help from gnulib.

Is there an easy way that I can determine which symbols *could* be
redefined by the gnulib modules I'm using when I'm working on a system
that does not require the redefinitions?

Do other people have these kinds of problems?  If so, how are you
dealing with them?

Thanks!

jwe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]