1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-10 23:56:14 +02:00
git/compat
Denton Liu 7027f508c7 compat/*.[ch]: remove extern from function declarations using spatch
In 554544276a (*.[ch]: remove extern from function declarations using
spatch, 2019-04-29), we removed externs from function declarations using
spatch but we intentionally excluded files under compat/ since some are
directly copied from an upstream and we should avoid churning them so
that manually merging future updates will be simpler.

In the last commit, we determined the files which taken from an upstream
so we can exclude them and run spatch on the remainder.

This was the Coccinelle patch used:

	@@
	type T;
	identifier f;
	@@
	- extern
	  T f(...);

and it was run with:

	$ git ls-files compat/\*\*.{c,h} |
		xargs spatch --sp-file contrib/coccinelle/noextern.cocci --in-place
	$ git checkout -- \
		compat/regex/ \
		compat/inet_ntop.c \
		compat/inet_pton.c \
		compat/nedmalloc/ \
		compat/obstack.{c,h} \
		compat/poll/

Coccinelle has some trouble dealing with `__attribute__` and varargs so
we ran the following to ensure that no remaining changes were left
behind:

	$ git ls-files compat/\*\*.{c,h} |
		xargs sed -i'' -e 's/^\(\s*\)extern \([^(]*([^*]\)/\1\2/'
	$ git checkout -- \
		compat/regex/ \
		compat/inet_ntop.c \
		compat/inet_pton.c \
		compat/nedmalloc/ \
		compat/obstack.{c,h} \
		compat/poll/

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2019-09-05 11:05:45 -07:00
..
nedmalloc
poll Merge branch 'js/mingw-use-utf8' 2019-07-11 15:16:49 -07:00
regex compat/regex/regcomp.c: define intptr_t and uintptr_t on NonStop 2019-01-03 14:16:20 -08:00
vcbuild msvc: add a Makefile target to pre-generate the Visual Studio solution 2019-07-29 14:51:43 -07:00
win32 compat/*.[ch]: remove extern from function declarations using spatch 2019-09-05 11:05:45 -07:00
access.c git-compat-util: work around for access(X_OK) under root 2019-04-25 17:49:44 +09:00
apple-common-crypto.h
basename.c
bswap.h compat/bswap: add include header guards 2019-03-07 07:42:14 +09:00
fileno.c git-compat-util: work around for access(X_OK) under root 2019-04-25 17:49:44 +09:00
fopen.c
gmtime.c
hstrerror.c
inet_ntop.c
inet_pton.c
memmem.c
mingw.c mingw: apply array.cocci rule 2019-09-05 11:05:03 -07:00
mingw.h compat/*.[ch]: remove extern from function declarations using spatch 2019-09-05 11:05:45 -07:00
mkdir.c
mkdtemp.c
mmap.c
msvc.c
msvc.h msvc: add pragmas for common warnings 2019-06-25 10:46:57 -07:00
obstack.c compat/obstack: fix -Wcast-function-type warnings 2019-01-17 11:13:38 -08:00
obstack.h obstack: fix compiler warning 2019-06-20 14:03:05 -07:00
pread.c
precompose_utf8.c Support working-tree-encoding "UTF-16LE-BOM" 2019-01-31 10:27:52 -08:00
precompose_utf8.h
qsort.c
qsort_s.c
setenv.c
sha1-chunked.c
sha1-chunked.h
snprintf.c
stat.c
strcasestr.c
strdup.c
strlcpy.c
strtoimax.c
strtoumax.c
terminal.c
terminal.h
unsetenv.c
win32.h
win32mmap.c
winansi.c Merge branch 'js/mingw-use-utf8' 2019-07-11 15:16:49 -07:00