[devel] Improved missing symbol handling in checksym.awk; symbols missing in
both the old and new files can now be optionally ignored, treated as errors or warnings.
This commit is contained in:
parent
f1cf90238b
commit
d02f246887
3
ANNOUNCE
3
ANNOUNCE
@ -462,6 +462,9 @@ Version 1.5.0beta56 [December 7, 2010]
|
||||
Version 1.5.0beta57 [December 7, 2010]
|
||||
Documented the pngvalid gamma error summary with additional comments and
|
||||
print statements.
|
||||
Improved missing symbol handling in checksym.awk; symbols missing in both
|
||||
the old and new files can now be optionally ignored, treated as errors
|
||||
or warnings.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||
(subscription required; visit
|
||||
|
3
CHANGES
3
CHANGES
@ -3100,6 +3100,9 @@ Version 1.5.0beta56 [December 7, 2010]
|
||||
Version 1.5.0beta57 [December 7, 2010]
|
||||
Documented the pngvalid gamma error summary with additional comments and
|
||||
print statements.
|
||||
Improved missing symbol handling in checksym.awk; symbols missing in both
|
||||
the old and new files can now be optionally ignored, treated as errors
|
||||
or warnings.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
@ -20,6 +20,7 @@ BEGIN{
|
||||
lasto = 0 # last ordinal value from png.h
|
||||
mastero = 0 # highest ordinal in master file
|
||||
symbolo = 0 # highest ordinal in png.h
|
||||
missing = "error"# log an error on missing symbols
|
||||
}
|
||||
|
||||
# Read existing definitions from the master file (the first
|
||||
@ -44,6 +45,13 @@ FILENAME==master && NF==2 && $2~/^@/ && $1!~/^;/ {
|
||||
print master ": bad export line format:", $0
|
||||
err = 1
|
||||
}
|
||||
FILENAME==master && $1==";missing" && NF==2{
|
||||
# This allows the master file to control how missing symbols
|
||||
# are handled; symbols that aren't in either the master or
|
||||
# the new file. Valid values are 'ignore', 'warning' and
|
||||
# 'error'
|
||||
missing = $2
|
||||
}
|
||||
FILENAME==master {
|
||||
next
|
||||
}
|
||||
@ -112,11 +120,19 @@ END{
|
||||
}
|
||||
}
|
||||
if (unexported != 0) {
|
||||
# Symbols in the .def but not in the new file are errors
|
||||
# Symbols in the .def but not in the new file are errors, but
|
||||
# the 'unexported' symbols aren't in either. By default this
|
||||
# is an error too (see the setting of 'missing' at the start),
|
||||
# but this can be reset on the command line or by stuff in the
|
||||
# file - see the comments above.
|
||||
if (missing != "ignore") {
|
||||
if (o-1 > unexported)
|
||||
print "png.h: warning: unexported symbol definitions:", unexported "-" o-1
|
||||
print "png.h:", missing ": missing symbols:", unexported "-" o-1
|
||||
else
|
||||
print "png.h: warning: unexported symbol definition:", unexported
|
||||
print "png.h:", missing ": missing symbol:", unexported
|
||||
if (missing != "warning")
|
||||
err = 1
|
||||
}
|
||||
unexported = 0
|
||||
}
|
||||
if (symbol[o] != "" && removed[o] != "") {
|
||||
|
@ -3,6 +3,12 @@
|
||||
; On OS/2 uncomment lines preceded by ;0S2
|
||||
;--------------------------------------------------------------
|
||||
|
||||
; make scripts/pngwin.chk will validate this file against the
|
||||
; build of libpng, the following line tells the check code to
|
||||
; ignore symbols (ordinal values) that are missing in both
|
||||
; files.
|
||||
;missing ignore
|
||||
|
||||
; If you give the library an explicit name one or other files
|
||||
; may need modifying to support the new name on one or more
|
||||
; systems.
|
||||
|
Loading…
Reference in New Issue
Block a user