The leading blank lines are apparently an artefact of an older source
control system. They are not required and they look like accidents,
because starting a source file with a blank line is not a regular habit
of software developers nowadays.
This is a cherry-pick of commit 37cc20add8fb5b83bb5299a26cd3b41e0f776017
from branch 'libpng18'.
Signed-off-by: John Bowler <jbowler@acm.org>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>
The old implementation of png_have_msa() caused a bus error,
if a word in /proc/cpuinfo was longer than 10 characters.
In the original implementation, `word[10]` was too short, and
`word[i++] = ch` caused a stack smash if the characters between
spaces were more than 10.
And also, fclose(f) should be called before leaving.
For example on loongson ls3a4000 cpu platform:
$ cat /proc/cpuinfo
system type : Generic Loongson64 System
machine : loongson,loongson64g-4core-ls7a
processor : 0
cpu model : ICT Loongson-3 V0.1 FPU V0.1
BogoMIPS : 3594.02
wait instruction : yes
microsecond timers : yes
tlb_entries : 2112
extra interrupt vector : no
hardware watchpoint : no
isa : mips1 mips2 mips3 mips4 mips5 mips32r1 mips32r2 mips64r1 mips64r2
ASEs implemented : vz msa loongson-mmi loongson-cam loongson-ext loongson-ext2
shadow register sets : 1
kscratch registers : 6
package : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available
processor : 1
cpu model : ICT Loongson-3 V0.1 FPU V0.1
BogoMIPS : 3611.26
wait instruction : yes
microsecond timers : yes
tlb_entries : 2112
extra interrupt vector : no
hardware watchpoint : no
isa : mips1 mips2 mips3 mips4 mips5 mips32r1 mips32r2 mips64r1 mips64r2
ASEs implemented : vz msa loongson-mmi loongson-cam loongson-ext loongson-ext2
shadow register sets : 1
kscratch registers : 6
package : 0
core : 1
VCED exceptions : not available
VCEI exceptions : not available
Co-authored-by: Cosmin Truta <ctruta@gmail.com>
Signed-off-by: Sui Jingfeng <15330273260@189.cn>
Signed-off-by: Cosmin Truta <ctruta@gmail.com>