summaryrefslogtreecommitdiff
path: root/util.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix race condition when creating initial cache directoryDavid Givone2012-09-231-0/+12
|
* Merge branch 'maint'Joel Rosdahl2012-09-131-3/+6
|\ | | | | | | | | * maint: Handle EAGAIN during copy_fd
| * Handle EAGAIN during copy_fdAlfred Landrum2012-09-071-3/+6
| | | | | | | | | | | | | | In util.c, write may return EAGAIN if the file descriptor is a full pipe. Currently, if this occurs, the log message "ccache: FATAL: Failed to copy fd" is printed and ccache exits. We've seen this locally when the recorded stderr output was exceptionally large due to many compilation warnings.
* | Improve log messages of x_unlink and tmp_unlinkJoel Rosdahl2012-08-081-9/+10
| |
* | Fix coding styleJoel Rosdahl2012-08-081-1/+1
| |
* | Implement x_realpath for WindowsPatrick von Reth2012-08-011-4/+11
| |
* | Merge branch 'maint'Joel Rosdahl2012-07-281-11/+28
|\ \ | |/ | | | | | | | | | | | | | | | | * maint: Improve get_relative_path and add unit tests Canonicalize paths when computing path relative to base directory Conflicts: test/test_util.c util.c
| * Improve get_relative_path and add unit testsJoel Rosdahl2012-07-281-12/+28
| |
| * Canonicalize paths when computing path relative to base directoryJoel Rosdahl2012-07-271-1/+2
| | | | | | | | | | | | This fixes a bug when current working directory contains a "/./" part. Based on a patch by Eric Blau.
* | Remove redundant codeJoel Rosdahl2012-07-141-9/+0
| |
* | Portability: Don't assume unsetenv has a non-void return typeJoel Rosdahl2012-03-071-3/+3
| |
* | Introduce x_unsetenv for increased portabilityJoel Rosdahl2012-03-051-0/+9
| |
* | Merge branch 'master' into configJoel Rosdahl2012-02-201-15/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Minor code style changes Support adjusting the compression level through CCACHE_COMPRESS_LEVEL Conflicts: MANUAL.txt ccache.c
| * | Minor code style changesJoel Rosdahl2012-02-201-9/+9
| | |
| * | Support adjusting the compression level through CCACHE_COMPRESS_LEVELHongli Lai (Phusion)2012-02-201-14/+15
| | |
* | | Make format_human_readable_size saner for size < 1000Joel Rosdahl2012-02-131-5/+1
| | |
* | | Merge branch 'master' into configJoel Rosdahl2012-01-081-6/+10
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: while (1) -> while (true) Fixup after merge: Make directory creation failure fatal Update NEWS Also recognize -specs=file in addition to --specs=file Revert GCC bug compatibility for -MTarg and -MQarg Fix minor memory leaks Correct log message when unify mode is enabled Hash environment variables that affect the preprocessor output Hash mtime or content of GCC plugins specified with -fplugin= Use hash_compiler for explicit --specs= options as well Refactor code into a hash_compiler function Improve description on how to fix bad object files in the cache Make failure to create files in cache fatal Make failure to create cache directories fatal Remove unused print_executed_command function Handle non-writable CCACHE_DIR gracefully Conflicts: manifest.c test/framework.c
| * | while (1) -> while (true)Joel Rosdahl2012-01-081-1/+1
| | |
| * | Merge branch 'maint'Joel Rosdahl2012-01-081-5/+9
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Update NEWS Also recognize -specs=file in addition to --specs=file Revert GCC bug compatibility for -MTarg and -MQarg Fix minor memory leaks Correct log message when unify mode is enabled Hash environment variables that affect the preprocessor output Hash mtime or content of GCC plugins specified with -fplugin= Use hash_compiler for explicit --specs= options as well Refactor code into a hash_compiler function Improve description on how to fix bad object files in the cache Make failure to create files in cache fatal Make failure to create cache directories fatal Remove unused print_executed_command function Handle non-writable CCACHE_DIR gracefully Conflicts: ccache.c test.sh test/test_argument_processing.c
| | * Fix minor memory leaksJoel Rosdahl2012-01-071-5/+9
| | |
* | | Use true/false for boolean valuesJoel Rosdahl2011-08-151-3/+3
| | |
* | | Merge branch 'master' into configJoel Rosdahl2011-08-151-0/+6
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (22 commits) Add the newest contributors Fix potential free() of non-heap memory Plug minor memory leak Minor code-style cleanup Correct win32 ifndefs Don't crash when getcwd() fails rework profile directory handling set output_to_real_object default to false, we get errors handling hardlinks Using hardlinks if requested comment Make sure we only handle known -fprofile flags. Rewrite profile directory to use absolute paths on commandline to increase direct / preprocessed hit rate. Move -fprofile handling into cc_process_args Look for .gcda files in profile directory when using profile Fix profile_use directory, and valgrind warning refactor to handle profile directories Use hash_delimeter before hashing profile data Avoid output_obj being freed by accident Fix comment style Hash the cwd if we're outputting to our object file first handle -fprofile-use ... Conflicts: ccache.c util.c
| * | Correct win32 ifndefsJoel Rosdahl2011-08-141-0/+2
| | |
| * | Merge branch 'maint'Joel Rosdahl2011-08-031-1/+5
| |\ \ | | |/ | | | | | | | | | * maint: Don't crash when getcwd() fails
| | * Don't crash when getcwd() failsJoel Rosdahl2011-08-031-1/+5
| | |
* | | Don't fetch current time for each logged configuration itemJoel Rosdahl2011-07-291-18/+29
| | |
* | | Add cc_log_without_flushJoel Rosdahl2011-07-291-7/+29
| | |
* | | Use NULL instead of 0 for null pointerJoel Rosdahl2011-07-291-1/+1
| | |
* | | Rename x_asprintf2 to reformatJoel Rosdahl2011-07-291-10/+11
| | |
* | | Let k/M/G/T be 10-based suffixes and introduce 2-based Ki/Mi/Gi/Ti as wellJoel Rosdahl2011-07-261-34/+49
| | |
* | | Use real size instead of multiples of 1024 for sizesJoel Rosdahl2011-07-261-17/+18
| | | | | | | | | | | | | | | Exception: Size values in stats files are still in units of 1024 for backward compatibility reasons.
* | | config: Use files and size limits from configJoel Rosdahl2011-07-201-1/+0
| | |
* | | Teach parse_size_with_suffix to parse float-style sizesJoel Rosdahl2011-07-201-5/+5
| | |
* | | Add utility function format_parsable_size_with_suffixJoel Rosdahl2011-07-201-0/+17
| | |
* | | Rename format_size to format_human_readable_sizeJoel Rosdahl2011-07-201-1/+1
| | |
* | | config: Use log_file from conf structJoel Rosdahl2011-07-201-3/+5
| | |
* | | Correctly free name in expand_variableJoel Rosdahl2011-07-121-0/+2
| | |
* | | Print "ccache: error: " instead of "ccache: FATAL: " for fatal ccache errorsJoel Rosdahl2011-05-301-1/+1
| | |
* | | Rename value_units to parse_size_with_suffix and handle errorsJoel Rosdahl2011-05-301-14/+22
| | |
* | | Add subst_env_in_string functionJoel Rosdahl2011-05-301-0/+80
|/ /
* | Merge branch 'maint'Joel Rosdahl2011-05-041-0/+1
|\ \ | |/ | | | | | | * maint: Fix minor memory leak in get_cwd()
| * Fix minor memory leak in get_cwd()Joel Rosdahl2011-05-041-1/+2
| | | | | | | | Found and suggested by Bo Rydberg.
* | Update copyright for 2011Joel Rosdahl2011-04-091-1/+1
| |
* | Update util functions in ccache.h to match realityJoel Rosdahl2011-03-271-42/+42
| |
* | Merge branch 'maint'Joel Rosdahl2011-01-031-0/+1
|\ \ | |/ | | | | | | | | | | | | | | * maint: Cope with file systems (e.g. FAT) that don't handle symlinks Close file handle in create_cachedirtag on write error Conflicts: lockfile.c
| * Close file handle in create_cachedirtag on write errorJoel Rosdahl2010-12-181-0/+1
| |
* | Merge branch 'maint'Joel Rosdahl2010-11-091-1/+1
|\ \ | |/ | | | | | | * maint: Fixed typo in x_calloc
| * Fixed typo in x_callocJoel Rosdahl2010-11-091-1/+1
| |
* | Merge branch 'maint'Joel Rosdahl2010-11-091-1/+15
|\ \ | |/ | | | | | | | | | | * maint: Make x_malloc and x_calloc always return NULL for zero byte allocations Fix calloc success check Fix malloc success check
| * Make x_malloc and x_calloc always return NULL for zero byte allocationsJoel Rosdahl2010-11-091-2/+16
| | | | | | | | | | This helps making sure that the code handles NULL return values regardless of platform.