Additional changes to make -Wshadow build on Ubuntu 10.04.

Looks like they defined basename() in string.h and ntohs/htonl are
implemented in terms of __bswap16() which is a macro with tmp
variables and so one cannot embed one call to ntohs/htons in another.
Not good but we workaround this limitation in glibc.
This commit is contained in:
Roland C. Dowdeswell
2012-06-07 16:59:01 +01:00
parent 5459558dea
commit abdde6a608
6 changed files with 47 additions and 46 deletions

View File

@@ -74,13 +74,13 @@ pidfile_cleanup(void)
}
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
pidfile(const char *basename)
pidfile(const char *bname)
{
if(pidfile_path != NULL)
return;
if(basename == NULL)
basename = getprogname();
pidfile_path = pid_file_write(basename);
if(bname == NULL)
bname = getprogname();
pidfile_path = pid_file_write(bname);
#if defined(HAVE_ATEXIT)
atexit(pidfile_cleanup);
#elif defined(HAVE_ON_EXIT)