在 postmaster.c 中看到这种代码,从Java程序员的角度,看起来是很不爽的:
到底何时 ListenAddress 的逻辑值为真呢?试作如下代码进行验证:
main(int argc, char **argv)
fprintf(stderr, "ListenAddresses is ok.\n");
fprintf(stderr, "ListenAddresses is NG.\n");
编译后运行结果:ListenAddresses is NG.
main(int argc, char **argv)
ListenAddress="192.168.2.5";
fprintf(stderr, "ListenAddresses is ok.\n");
fprintf(stderr, "ListenAddresses is %s.\n",ListenAddress);
fprintf(stderr, "ListenAddresses is NG.\n");
ListenAddresses is 192.168.2.5.
本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/archive/2012/07/17/2595334.html,如需转载请自行联系原作者