Hello. At Sun, 29 Sep 2019 23:51:23 -0500, Joe Nelson <j...@begriffs.com> wrote in <20190930045123.gc68...@begriffs.com> > Alvaro Herrera wrote: > > ... can we have a new patch? > > OK, I've attached v4. It works cleanly on 55282fa20f with > str2int-16.patch applied. My patch won't compile without the other one > applied too. > > Changed: > [x] revert my changes in common/Makefile > [x] rename arg_utils.[ch] to option.[ch] > [x] update @pgfeutilsfiles in Mkvcbuild.pm > [x] pgindent everything > [x] get rid of atoi() in more utilities
Compiler complained as "INT_MAX undeclared" (gcc 7.3 / CentOS7.6). > One question about how the utilities parse port numbers. I currently > have it check that the value can be parsed as an integer, and that its > range is within 1 .. (1<<16)-1. I wonder if the former restriction is > (un)desirable, because ultimately getaddrinfo() takes a "service name > description" for the port, which can be a name such as found in > '/etc/services' as well as the string representation of a number. If > desired, I *could* treat only range errors as a failure for ports, and > allow integer parse errors. We could do that, but perhaps no use for our usage. We are not likely to use named ports other than 'postgres', if any. regards. -- Kyotaro Horiguchi NTT Open Source Software Center