doc
m4
scripts
check_config_h.rb
makedist.sh
mpd-indent.sh
test.sh
src
test
.gitignore
AUTHORS
COPYING
INSTALL
Makefile.am
NEWS
README
UPGRADING
autogen.sh
configure.ac
mpd.service.in
valgrind.suppressions

After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
48 lines
977 B
Ruby
Executable File
48 lines
977 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
#
|
|
# This script verifies that every source includes config.h first.
|
|
# This is very important for consistent Large File Support.
|
|
#
|
|
|
|
def check_file(file)
|
|
first = true
|
|
file.each_line do |line|
|
|
if line =~ /^\#include\s+(\S+)/ then
|
|
if $1 == '"config.h"'
|
|
unless first
|
|
puts "#{file.path}: config.h included too late"
|
|
end
|
|
else
|
|
if first
|
|
puts "#{file.path}: config.h missing"
|
|
end
|
|
end
|
|
first = false
|
|
end
|
|
end
|
|
end
|
|
|
|
def check_path(path)
|
|
File.open(path) do |file|
|
|
check_file(file)
|
|
end
|
|
end
|
|
|
|
if ARGV.empty?
|
|
Dir["src/*.c"].each do |path|
|
|
check_path(path)
|
|
end
|
|
|
|
Dir["src/*/*.c"].each do |path|
|
|
check_path(path)
|
|
end
|
|
|
|
Dir["test/*.c"].each do |path|
|
|
check_path(path)
|
|
end
|
|
else
|
|
ARGV.each do |path|
|
|
check_path(path)
|
|
end
|
|
end
|