Hello, all:
I have a program problem, ( may it not have close releationship with Debian), it described like this:
I want to using #define / #undef, and want to put them in a single macro, some thing like:
#define DECALRE_TYPE(type) \ { #undef __curr_type; #define _curr_type type; }
as we know, this can not passed with CPP, but I need this logical here.
Generally, the problem comes from
#define ser_field(type, var) \ ser_new_field(tra, #type, #var, offsetof(struct_type, var))
I do not want another additional parameter in this macro like
#define ser_field(type,var,struct_type), and I want a sentence declare "current struct type" and all later work of ser_field will defaultly use this type.
I am not sure whether I can express it clearly, any ideas will be greately appreciated!
Thanks and B.R.
2013/12/10 John Doe jdmls@yahoo.com
From: Lars Hecking lhecking@users.sourceforge.net
One thing I have noticed on CentOS6 is that rsync via xinetd never works after a reboot. It always takes an additional, post-reboot service xinetd restart to get it going. That has been the same for all revisions up to and including 6.5, and I've seen it on more than just machine.
While I don't see such a message on other problem machines, the latest reboot gave me a clue:
Dec 9 23:28:36 host xinetd[21131]: bind failed (Address already in use
(errno =
98)). service = rsync Dec 9 23:28:36 host xinetd[21131]: Service rsync failed to start and is deactivated.
Is there any way to debug this? I suspect it needs to be debugged during reboot since the service starts up fine later.
"Address already in use" => check what is listening on port 873? In the rsync xinetd conf it says IPv6 here...
JD _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Tue, 10 Dec 2013, Nicol TAO wrote:
I want to using #define / #undef, and want to put them in a single macro, some thing like:
#define DECALRE_TYPE(type) \ { #undef __curr_type; #define _curr_type type; }
as we know, this can not passed with CPP, but I need this logical here.
I think that you are out of luck. The preprocessor will not macro-expand one line into more than one line. Also, #s generated from macro-expansion do not count as preprocessor flags.
To get two lines from one, you need #include. #include "dcltype" Have one such file per type.
Generally, the problem comes from
#define ser_field(type, var) \ ser_new_field(tra, #type, #var, offsetof(struct_type, var))
I do not want another additional parameter in this macro like
#define ser_field(type,var,struct_type), and I want a sentence declare "current struct type" and all later work of ser_field will defaultly use this type.