From f861391a5916aa5fcbdd0390bad6afa908ee6d29 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 7 Oct 2016 20:04:46 +0200 Subject: [PATCH 01/10] tools/ac_converter: couple of trivial fixes (#867) W: 31, 4: Duplicate key 'HAVE_UNSETENV' in dictionary (duplicate-key) Signed-off-by: Igor Gnatenko * tools/ac_converter: fix undefined variable 'func' E:283,11: Undefined variable 'func' (undefined-variable) Signed-off-by: Igor Gnatenko * tools/ac_converter: use spaces properly in HAVE_SOCKET C: 97, 0: Exactly one space required after comma 'HAVE_SOCKET' : ('socket',' sys/socket.h'), ^ (bad-whitespace) This also might cause some issue after conversion. Signed-off-by: Igor Gnatenko (cherry picked from commit 1df8c5c62b7492b89eb4c3d836d33eba215def7f) --- tools/ac_converter.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/ac_converter.py b/tools/ac_converter.py index c7c9f44..4f284af 100755 --- a/tools/ac_converter.py +++ b/tools/ac_converter.py @@ -94,7 +94,7 @@ function_data = \ 'HAVE_READLINK': ('readlink', 'unistd.h'), 'HAVE_RES_INIT': ('res_init', 'resolv.h'), 'HAVE_SENDMMSG': ('sendmmsg', 'sys/socket.h'), - 'HAVE_SOCKET' : ('socket',' sys/socket.h'), + 'HAVE_SOCKET' : ('socket', 'sys/socket.h'), 'HAVE_GETENV': ('getenv', 'stdlib.h'), 'HAVE_SETENV': ('setenv', 'stdlib.h'), 'HAVE_PUTENV': ('putenv', 'stdlib.h'), @@ -115,7 +115,6 @@ function_data = \ 'HAVE_SYMLINK': ('symlink', 'unistd.h'), 'HAVE_SYSCTLBYNAME': ('sysctlbyname', 'sys/sysctl.h'), 'HAVE_TIMEGM': ('timegm', 'time.h'), - 'HAVE_UNSETENV': ('unsetenv', 'stdlib.h'), 'HAVE_USELOCALE': ('uselocale', 'xlocale.h'), 'HAVE_UTIMES': ('utimes', 'sys/time.h'), 'HAVE_VALLOC': ('valloc', 'stdlib.h'), @@ -280,7 +279,7 @@ endforeach print('check_functions = [') for token in functions: - if len(func) == 3: + if len(token) == 3: token, fdata0, fdata1 = token print(" ['%s', '%s', '#include<%s>']," % (token, fdata0, fdata1)) else: -- 2.10.1