1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-04 14:40:54 -08:00
emacs/lib
Paul Eggert f4eb890029 Limit <config.h>’s includes
This follows up on recent problems with the fact that config.h
includes stdlib.h etc.; some files need to include stdlib.h later.
config.h generally should limit itself to includes that are
universally safe; outside of MS-Windows, only stdbool.h makes
the cut among the files currently included.  So, move the
other includes to just the files that need them (Bug#24506).
* configure.ac (config_opsysfile): Remove, as this generic hook
is no longer needed.
* lib-src/etags.c, src/unexmacosx.c, src/w32.c, src/w32notify.c:
* src/w32proc.c (_GNU_SOURCE):
Remove, as it’s OK for config.h to do this now.
* src/conf_post.h: Include <ms-w32.h>, instead of the generic
config_opsysfile, for simplicity as this old way of configuring is
now done only for the MS-Windows port.  Do not include <ms-w32.h>
if DEFER_MS_W32_H, for the benefit of the few files that want its
effects later.  Do not include <alloca.h>, <string.h>, or
<stdlib.h>.  Other files modified to include these headers as
needed, or to not include headers that are no longer needed.
* src/lisp.h: Include <alloca.h> and <string.h> here, since
some of the inline functions need them.
* src/regex.c: Include <alloca.h> if not emacs.  (If emacs,
we can rely on SAFE_ALLOCA.)  There is no longer any need to
worry about HAVE_ALLOCA_H.
* src/unexmacosx.c: Rely on config.h not including stdlib.h.
* src/w32.c, src/w32notify.c, src/w32proc.c (DEFER_MS_W32_H):
Define before including <config.h> first, and include <ms-w32.h>
after the troublesome headers.
2016-09-30 12:38:52 -07:00
..
acl-errno-valid.c
acl-internal.c
acl-internal.h
acl.h
acl_entries.c
alloca.in.h Update from gnulib 2016-08-21 04:26:53 -07:00
allocator.c
allocator.h
at-func.c
binary-io.c
binary-io.h
byteswap.in.h
c-ctype.c
c-ctype.h
c-strcase.h
c-strcasecmp.c
c-strncasecmp.c
careadlinkat.c
careadlinkat.h
close-stream.c
close-stream.h
COPYING
count-one-bits.c
count-one-bits.h
count-trailing-zeros.c
count-trailing-zeros.h
dirent.in.h
dirfd.c
dosname.h
dtoastr.c
dtotimespec.c
dup2.c
errno.in.h
euidaccess.c Update from gnulib 2016-09-07 18:10:11 -07:00
execinfo.c
execinfo.in.h
faccessat.c
fcntl.c
fcntl.in.h
fdatasync.c
fdopendir.c
filemode.c
filemode.h
filevercmp.c
filevercmp.h
flexmember.h Update from gnulib 2016-09-07 18:10:11 -07:00
fpending.c
fpending.h
fstatat.c
fsync.c
ftoastr.c
ftoastr.h Update from gnulib 2016-09-15 15:55:30 -07:00
get-permissions.c
getdtablesize.c
getgroups.c
getloadavg.c
getopt.c
getopt.in.h
getopt1.c
getopt_.h
getopt_int.h
gettext.h Sync from gnulib 2016-05-13 07:52:14 -07:00
gettime.c
gettimeofday.c
gnulib.mk Port recent flexmember changes to NetBSD 2016-09-21 15:18:06 -07:00
group-member.c Update from gnulib 2016-09-07 18:10:11 -07:00
ignore-value.h
intprops.h Update from gnulib 2016-09-15 15:55:30 -07:00
inttypes.in.h
limits.in.h Update from gnulib 2016-09-15 15:55:30 -07:00
lstat.c
Makefile.am
md5.c
md5.h
memrchr.c
min-max.h
mkostemp.c
mktime-internal.h Sync from gnulib 2016-05-01 18:37:01 -07:00
mktime.c Update from gnulib 2016-08-03 15:12:06 -07:00
openat-die.c Limit <config.h>’s includes 2016-09-30 12:38:52 -07:00
openat-priv.h
openat-proc.c
openat.h
pathmax.h
pipe2.c
pselect.c
pthread_sigmask.c
putenv.c
qcopy-acl.c
readlink.c
readlinkat.c
root-uid.h
save-cwd.c
save-cwd.h
secure_getenv.c Update from gnulib 2016-05-30 16:13:04 -07:00
set-permissions.c Sync with gnulib 2016-03-10 07:59:19 -08:00
sha1.c
sha1.h
sha256.c
sha256.h
sha512.c
sha512.h
sig2str.c
sig2str.h
signal.in.h
stat-time.c
stat-time.h
stat.c
stdalign.in.h
stddef.in.h Sync with gnulib 2016-04-03 23:12:29 -07:00
stdint.in.h Update from gnulib 2016-09-15 15:55:30 -07:00
stdio.in.h
stdlib.in.h
stpcpy.c
strftime.c
strftime.h
string.in.h Update from gnulib 2016-08-21 04:26:53 -07:00
strtoimax.c
strtol.c Sync from gnulib 2016-05-01 18:37:01 -07:00
strtoll.c
strtoul.c
strtoull.c
strtoumax.c
symlink.c
sys_select.in.h Sync with gnulib 2016-03-23 11:19:52 -07:00
sys_stat.in.h
sys_time.in.h
sys_types.in.h
tempname.c
tempname.h
time-internal.h
time.in.h
time_r.c
time_rz.c Update from gnulib 2016-09-07 18:10:11 -07:00
timegm.c Sync from gnulib 2016-05-01 18:37:01 -07:00
timespec-add.c
timespec-sub.c
timespec.c
timespec.h
u64.c
u64.h
unistd.c
unistd.in.h
unsetenv.c
utimens.c
utimens.h
verify.h Update from gnulib 2016-05-30 16:13:04 -07:00
vla.h
xalloc-oversized.h Update from gnulib 2016-08-30 13:16:22 -07:00