--e89a8fb203fa39bdb904c9e3ee22
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
hey all,
I'm trying to build my own broker using C++ language ( g++-4.7.real (Debian
4.7.1-2) 4.7.1, nagios 3.4.1 ).
Something goes wrong when g++ compiles the commandsmember structure in
objects.h :
/* COMMANDSMEMBER structure */
typedef struct commandsmember_struct {
char *command;
#ifdef NSCORE
command *command_ptr;
#endif
struct commandsmember_struct *next;
} commandsmember;
../include/objects.h:180:2: error: =91command=92 does not name a type. I th=
ink
it is C++'s rule C++11 3.3.10/1:
"A name can be hidden by an explicit declaration of that same name in a
nested declarative region or derived class."
So I came with that patch which seems to be the best way to get both gcc
and g++ happy.
--- objects.h.org 2012-08-12 17:46:35.000000000 +0200
+++ objects.h 2012-08-12 18:00:24.000000000 +0200
@@ -177,7 +177,7 @@
typedef struct commandsmember_struct {
char *command;
#ifdef NSCORE
- command *command_ptr;
+ struct command_ptr *command_ptr;
#endif
struct commandsmember_struct *next;
} commandsmember;
jfr
--e89a8fb203fa39bdb904c9e3ee22
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
hey all,I'm trying to build my own broker using C++ language ( =
g++-4.7.real (Debian 4.7.1-2) 4.7.1, nagios 3.4.1 ).Something goes =
wrong when g++ compiles the commandsmember structure in objects.h :
/* COMMANDSMEMBER structure */typedef struct commandsmember_struct { char *command;#ifdef NSCORE command *command_ptr;#endif s=
truct commandsmember_struct *next; } commandsmember;../include/=
objects.h:180:2: error: =91command=92 does not name a type. I think it is C=
++'s rule C++11 3.3.10/1:
"A name can be hidden by an explicit declaration of that same name=
in a nested declarative region or derived class."So I came wi=
th that patch which seems to be the best way to get both gcc and g++ happy.=
--- objects.h.org 2012-08-12 17:46=
:35.000000000 +0200+++ objects.h 2012-08-12 18:00:24.000000000 +0200@@ -177,7 +177,7 @@ typedef struct commandsmember_struct { char *=
command;
#ifdef NSCORE- command *command_ptr;+ struct command_ptr *command_=
ptr; #endif struct commandsmember_struct *next; } commandsmem=
ber;jfr
--e89a8fb203fa39bdb904c9e3ee22--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]