diff options
| author | Paul Eggert | 2016-02-29 09:39:45 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-02-29 09:40:58 -0800 |
| commit | 93bf7d52841c60ffc10e0c9c789a7987812ce55e (patch) | |
| tree | 443f8b37cf01441daab1a3e3a932417a3449a4c2 /src | |
| parent | 938f104f1b8de0a082f4736aaf504cea4f65765e (diff) | |
| download | emacs-93bf7d52841c60ffc10e0c9c789a7987812ce55e.tar.gz emacs-93bf7d52841c60ffc10e0c9c789a7987812ce55e.zip | |
Stop calling res_init
Emacs shouldn’t need to call res_init any more, now that nscd or
equivalent is everywhere. On modern systems, calling res_init
simply slows Emacs down. On ancient systems lacking nscd Emacs
will still work well enough with this change; it’s just that it
won’t respond to changes in /etc/resolv.conf.
* configure.ac (HAVE_RES_INIT): Remove. Worry about -lresolv only
when configured --with-hesiod. Hesiod is still used; see, e.g.:
https://soylentnews.org/meta/article.pl?sid=15/07/13/0255214
* src/Makefile.in (LIBRESOLV): Remove. All uses removed.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.in | 5 | ||||
| -rw-r--r-- | src/process.c | 13 |
2 files changed, 1 insertions, 17 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index 99394ac57cf..8dcaf7e4759 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -302,9 +302,6 @@ CM_OBJ=@CM_OBJ@ | |||
| 302 | 302 | ||
| 303 | LIBGPM = @LIBGPM@ | 303 | LIBGPM = @LIBGPM@ |
| 304 | 304 | ||
| 305 | ## -lresolv, or empty. | ||
| 306 | LIBRESOLV = @LIBRESOLV@ | ||
| 307 | |||
| 308 | LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ | 305 | LIBSELINUX_LIBS = @LIBSELINUX_LIBS@ |
| 309 | 306 | ||
| 310 | LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ | 307 | LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ |
| @@ -485,7 +482,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ | |||
| 485 | $(WEBKIT_LIBS) \ | 482 | $(WEBKIT_LIBS) \ |
| 486 | $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ | 483 | $(LIB_EACCESS) $(LIB_FDATASYNC) $(LIB_TIMER_TIME) $(DBUS_LIBS) \ |
| 487 | $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) $(XFIXES_LIBS) \ | 484 | $(LIB_EXECINFO) $(XRANDR_LIBS) $(XINERAMA_LIBS) $(XFIXES_LIBS) \ |
| 488 | $(LIBXML2_LIBS) $(LIBGPM) $(LIBRESOLV) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ | 485 | $(LIBXML2_LIBS) $(LIBGPM) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ |
| 489 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ | 486 | $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ |
| 490 | $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ | 487 | $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ |
| 491 | $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) \ | 488 | $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) \ |
diff --git a/src/process.c b/src/process.c index f40e8e53a24..85a4885bbf4 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -75,11 +75,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 75 | # include <sys/stropts.h> | 75 | # include <sys/stropts.h> |
| 76 | #endif | 76 | #endif |
| 77 | 77 | ||
| 78 | #ifdef HAVE_RES_INIT | ||
| 79 | #include <arpa/nameser.h> | ||
| 80 | #include <resolv.h> | ||
| 81 | #endif | ||
| 82 | |||
| 83 | #ifdef HAVE_UTIL_H | 78 | #ifdef HAVE_UTIL_H |
| 84 | #include <util.h> | 79 | #include <util.h> |
| 85 | #endif | 80 | #endif |
| @@ -3827,10 +3822,6 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3827 | immediate_quit = 1; | 3822 | immediate_quit = 1; |
| 3828 | QUIT; | 3823 | QUIT; |
| 3829 | 3824 | ||
| 3830 | #ifdef HAVE_RES_INIT | ||
| 3831 | res_init (); | ||
| 3832 | #endif | ||
| 3833 | |||
| 3834 | struct addrinfo hints; | 3825 | struct addrinfo hints; |
| 3835 | memset (&hints, 0, sizeof hints); | 3826 | memset (&hints, 0, sizeof hints); |
| 3836 | hints.ai_family = family; | 3827 | hints.ai_family = family; |
| @@ -3910,10 +3901,6 @@ usage: (make-network-process &rest ARGS) */) | |||
| 3910 | immediate_quit = 1; | 3901 | immediate_quit = 1; |
| 3911 | QUIT; | 3902 | QUIT; |
| 3912 | 3903 | ||
| 3913 | #ifdef HAVE_RES_INIT | ||
| 3914 | res_init (); | ||
| 3915 | #endif | ||
| 3916 | |||
| 3917 | host_info_ptr = gethostbyname ((const char *) SDATA (host)); | 3904 | host_info_ptr = gethostbyname ((const char *) SDATA (host)); |
| 3918 | immediate_quit = 0; | 3905 | immediate_quit = 0; |
| 3919 | 3906 | ||