aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2017-06-15 13:29:04 -0700
committerPaul Eggert2017-06-15 13:30:30 -0700
commit21d10e59f89a5bb72829ffb8ebe4463ba4fac124 (patch)
tree5e6d98853562542a09f4bf6cd09d0ec7221ef621 /src
parent2b9620e6af80a1ce57321bc32d126b602ca493ce (diff)
downloademacs-21d10e59f89a5bb72829ffb8ebe4463ba4fac124.tar.gz
emacs-21d10e59f89a5bb72829ffb8ebe4463ba4fac124.zip
Pacify clang without munging C source
* configure.ac (WARN_CFLAGS): With Clang, use -Wno-tautological-compare regardless of --enable-gcc-warnings. (WERROR_CFLAGS): Simplify assignments, and guarantee it’s always set. * lib/strftime.c: Copy from gnulib, reverting Clang-specific change which I hope is no longer needed. * src/emacs.c (main): Revert rlim_t change, as rlim_t is signed on some older non-POSIX hosts.
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 08430de6ca7..da8df1bf1c7 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -832,7 +832,7 @@ main (int argc, char **argv)
832 (https://www.cygwin.com/ml/cygwin/2015-07/msg00096.html). */ 832 (https://www.cygwin.com/ml/cygwin/2015-07/msg00096.html). */
833 struct rlimit rlim; 833 struct rlimit rlim;
834 if (getrlimit (RLIMIT_STACK, &rlim) == 0 834 if (getrlimit (RLIMIT_STACK, &rlim) == 0
835 && rlim.rlim_cur <= LONG_MAX) 835 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= LONG_MAX)
836 { 836 {
837 rlim_t lim = rlim.rlim_cur; 837 rlim_t lim = rlim.rlim_cur;
838 838
@@ -866,7 +866,7 @@ main (int argc, char **argv)
866 right thing anyway. */ 866 right thing anyway. */
867 long pagesize = getpagesize (); 867 long pagesize = getpagesize ();
868 newlim += pagesize - 1; 868 newlim += pagesize - 1;
869 if (rlim.rlim_max < newlim) 869 if (0 <= rlim.rlim_max && rlim.rlim_max < newlim)
870 newlim = rlim.rlim_max; 870 newlim = rlim.rlim_max;
871 newlim -= newlim % pagesize; 871 newlim -= newlim % pagesize;
872 872