summaryrefslogtreecommitdiff
path: root/src/safeguard.c
Commit message (Collapse)AuthorAgeFilesLines
* Normalize the copyright text, to the latest version of the GPLv2 textcsilvers2008-05-231-9/+9
| | | | | | | | | | | (typically the only change is in the FSF street address). Add Google copyright line in some places it was missing. Add GPLv2 notice to avahi patches. OKed by fergus git-svn-id: http://distcc.googlecode.com/svn/trunk@387 01de4be4-8c4a-0410-9132-4925637da917
* Change C++-style // comments to /**/.csilvers2008-05-201-1/+1
| | | | | | | | | | | | Also, fix the emacs var-setting line: it was missing a semicolon before, which means the entire line was being ignored. No contentful change. Reviewed by fergus@google.com git-svn-id: http://distcc.googlecode.com/svn/trunk@321 01de4be4-8c4a-0410-9132-4925637da917
* Turned all tabs into 4 spaces. Got rid of whitespace at the end ofcsilvers2008-05-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | | lines. Fixed up resulting mis-indented code I noticed (mostly in files that used 8 space indents, or used 4-space and 8-space indents in the same file (!)). Added the emacs tab-var setting for all files, not just some of them. I also added in copyright notices for files I noticed that didn't have them. We'll want to do another pass-through to fix these up properly, though. I used the following perl snippet to check for mis-indented code after converting tabs to whitespace: $ for i in *.{c,h}; do echo $i; perl -nle 'if ($indent > 0) {$sp=" " x $indent; /^$sp[^ ]/ && print "$.: $_"; $indent=0;}; if (/^( *).*{/ ) {$indent=length($1);} else {$indent=0;}' $i; done | less It had false positives, but hopefully didn't miss anything. Reviewed by klarlund@google.com git-svn-id: http://distcc.googlecode.com/svn/trunk@320 01de4be4-8c4a-0410-9132-4925637da917
* Add a consistent emacs-variable header to all source files. Thiscsilvers2008-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | affects the way emacs users will see these files, when visiting them in emacs. In particular, tabs will show up as 4 spaces, which is (clearly) the setting the original distcc author used when writing the code. We also set an emacs variable to never insert new tabs, but use spaces instead. This will help stop the problem we have now with mixed tabs and spaces. In a future cleanup, we may replace all tabs with 4 spaces, and make other whitespace improvements. The final new variable set, is to set line-wrapping at 78 chars. Personally, I would have made it more like 72, but some existing files already had the 78 limit, so I just do that everywhere, to be consistent. Reviewed by fergus@google.com git-svn-id: http://distcc.googlecode.com/svn/trunk@244 01de4be4-8c4a-0410-9132-4925637da917
* Make handling of config.h sound.klarlund2008-05-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) Correct order of -Is in Makefile. (2) remove unnessary PATH modification in configure.ac (this is fergus's suggestion -- hopefully this will do, this replaces a circumvention mechanism I had originally concocted. (3) Fix place of the include of popt in CPPFLAGS. (4) Convert quoted includes of config.h to angle bracket includes so that the build version, not the source version, of this file is picked up. The order of -Is in the build system is wrong: it contradicts the VPATH mechanism. This means that builds in a build directory different from that of the source (distribution) directory will find wrong files even after the hapless developer has issued only a 'configure' command in the source directory (but not actually 'made' any thing there). For in that case, the src/config.h will be generated in the source directory and this will be the file picked in the build directory even if that directory has it's own src/config.h. This can lead to wrong builds and it can be hard to diagnose the problem. Currently, this what CPPFLAGS end up being (as found in the generated Makefile): CPPFLAGS = -DHAVE_CONFIG_H -D_GNU_SOURCE \ -I../distcc/popt -I../distcc/src \ ${DIR_DEFS} \ -Isrc -Ilzo \ -I"$(srcdir)/src" -I"$(srcdir)/lzo" \ Here my source dir was ../distcc. The presence of '-I../distcc/popt' in front of -Isrc is the exact opposite of the semantics of VPATH mechanism, which looks for files in the build directory, then in the source directory. Also, note the remarks in: http://www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Headers (they do not quite correctly discuss the search path, btw). TESTING: I verified that with a corrupted config.h file in the source directory, building now succeeds. Also: make distcheck (it fails the same place as before: this is corrected in another change of mine --- I'll verify that with that change in place, this change makes 'make distcheck' succeed.) REVIEWERS: fergus@google.com, csilvers@google.com git-svn-id: http://distcc.googlecode.com/svn/trunk@148 01de4be4-8c4a-0410-9132-4925637da917
* The first step of moving everything in the distcc directory to the topcsilvers2008-04-111-0/+81
level. I'm doing this in two stages, because I don't understand svn enough to be confident to do it in one. This first stage just copies all the files from distcc/FOO to FOO. Now there are two copies of each file under distcc; the Makefile/etc uses the one in distcc and ignores the one at the top level. The next commit will delete everything under distcc, and rewrite the Makefile/etc to use the top-level versions instead. git-svn-id: http://distcc.googlecode.com/svn/trunk@22 01de4be4-8c4a-0410-9132-4925637da917