]> git.refcnt.org Git - colorize.git/blobdiff - colorize.c
Support files larger than 2GB on 32-bit systems
[colorize.git] / colorize.c
index 2cd137a5e65b18452f55115d554974ae285c9c58..718b74d6f77b67c8ffaefc7c36307cc21111fbf5 100644 (file)
@@ -21,6 +21,7 @@
 
 #define _BSD_SOURCE
 #define _XOPEN_SOURCE 700
+#define _FILE_OFFSET_BITS 64
 #include <assert.h>
 #include <ctype.h>
 #include <errno.h>
@@ -499,7 +500,7 @@ process_args (unsigned int arg_cnt, char **arg_strings, bool *bold, const struct
 
     /* Ensure that we don't fail if there's a file with one or more
        color names in its path.  */
-    if (ret != -1)
+    if (ret == 0) /* success */
       {
         bool have_file;
         unsigned int c;