[reSIProcate] how to generate HeaderHash.cxx on Win32
I Want to add a new Header, but I don't know how to used gperf generate
HeaderHash.cxx on Win32.
I type "gperf -D --enum -E -L C++ -t -k '*' --compare-strncmp -Z HeaderHash
--output-file HeaderHash.cxx HeaderHash.gperf" in cmd. and build my test
program, but the result is not correct.
This is my test program, Kao is new header, and it is single header:
Data txt("INVITE sip:192.168.2.92:5100;q=1 SIP/2.0\r\n"
"To: <sip:yiwen@xxxxxxxxxxxxxxxxx>\r\n"
"From: Jason
Fischl<sip:jason@xxxxxxxxxxxxxxxxx>;tag=ba1aee2d\r\n"
"Kao: hello\r\n"
"\r\n");
auto_ptr<SipMessage> msg(SipMessage::make(txt));
cout << *msg << endl << endl;
Data myStr("what");
msg->header(h_Kao).value() = myStr;
cout << *msg;
The output is:
INVITE sip:192.168.2.92:5100;q=1 SIP/2.0
Content-Length: 0
To: <sip:yiwen@xxxxxxxxxxxxxxxxx>
From: Jason Fischl<sip:jason@xxxxxxxxxxxxxxxxx>;tag=ba1aee2d
Kao: hello
INVITE sip:192.168.2.92:5100;q=1 SIP/2.0
Kao: what
Content-Length: 0
To: <sip:yiwen@xxxxxxxxxxxxxxxxx>
From: Jason Fischl<sip:jason@xxxxxxxxxxxxxxxxx>;tag=ba1aee2d
Kao: hello