Skip to content

Commit adcdd63

Browse files
committed
Merge r1926110, r1926111 from trunk:
Correctly check return value of getline In case of an error (e.g. file not found or readable) getline returns -1 which causes an endless loop. Leave the loop in such cases. * Correctly handle filenames that contain spaces Reviewed by: rpluem, ylavic, jorton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1927027 13f79535-47bb-0310-9956-ffa450edef68
1 parent 3e7ac12 commit adcdd63

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

Makefile.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,19 +156,19 @@ docs:
156156
fi
157157

158158
update-changes:
159-
@for i in `find changes-entries -type f`; do \
159+
@find changes-entries -type f | while read -r i ; do \
160160
cp CHANGES CHANGES.tmp ; \
161-
awk -v fname=$$i 'BEGIN{done = 0; active = 0} \
161+
awk -v fname="$$i" 'BEGIN{done = 0; active = 0} \
162162
done == 0 && active == 0 && /^Changes with Apache /{ active = 1; print; next}; \
163-
/^( *\*|Changes with Apache )/ && active == 1 && done == 0{rec=$$0; while(getline<fname){if (! ($$0 ~ /^ *$$/)){print}}printf "\n";print rec; active = 0; done = 1; next} //;' \
163+
/^( *\*|Changes with Apache )/ && active == 1 && done == 0{rec=$$0; while((getline<fname) > 0){if (! ($$0 ~ /^ *$$/)){print}}printf "\n";print rec; active = 0; done = 1; next} //;' \
164164
CHANGES.tmp > CHANGES ; \
165165
rm CHANGES.tmp ; \
166166
if [ -n "$(SVN)" ] ; then \
167-
if ! $(SVN) rm $$i 2>/dev/null ; then \
168-
$(RM) $$i ; \
167+
if ! $(SVN) rm "$$i" 2>/dev/null ; then \
168+
$(RM) "$$i" ; \
169169
fi ; \
170170
else \
171-
$(RM) $$i ; \
171+
$(RM) "$$i" ; \
172172
fi ; \
173173
done ; \
174174
if [ -n "$(SVN)" ] ; then \

STATUS

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,6 @@ RELEASE SHOWSTOPPERS:
158158
PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
159159
[ start all new proposals below, under PATCHES PROPOSED. ]
160160

161-
*) Makefile.in: Correctly deal with change entries whose filenames contain
162-
spaces.
163-
Trunk version of patch:
164-
https://svn.apache.org/r1926110
165-
https://svn.apache.org/r1926111
166-
Backport version for 2.4.x of patch:
167-
Trunk version of patch works
168-
svn merge -c 1926110,1926111 ^/httpd/httpd/trunk .
169-
+1: rpluem, ylavic, jorton
170161

171162
PATCHES PROPOSED TO BACKPORT FROM TRUNK:
172163
[ New proposals should be added at the end of the list ]

0 commit comments

Comments
 (0)