diff options
| author | Paul Eggert | 2012-07-06 03:08:57 +0000 |
|---|---|---|
| committer | Paul Eggert | 2012-07-06 03:08:57 +0000 |
| commit | 7dca65a4b4ff280171df473557d5fc0f98540200 (patch) | |
| tree | b703e6a714e38b3f4f0328f7dd095c15f3c8912e | |
| parent | 8c6c57ea627f1d32ec1564fc86851974b19f1cb8 (diff) | |
| download | emacs-7dca65a4b4ff280171df473557d5fc0f98540200.tar.gz emacs-7dca65a4b4ff280171df473557d5fc0f98540200.zip | |
Port to OpenBSD 5.1 amd64.
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | m4/sys_time_h.m4 | 8 | ||||
| -rw-r--r-- | src/ChangeLog | 10 | ||||
| -rw-r--r-- | src/sysdep.c | 14 |
4 files changed, 30 insertions, 8 deletions
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-07-06 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Merge from gnulib. This is for OpenBSD 5.1 amd64. | ||
| 4 | * m4/sys_time_h.m4: New version from gnulib, incorporating: | ||
| 5 | 2012-07-05 sys_time: allow too-wide tv_sec | ||
| 6 | |||
| 1 | 2012-07-04 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2012-07-04 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 8 | ||
| 3 | Merge from gnulib. | 9 | Merge from gnulib. |
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4 index 26eaf8ea7f3..c4a30cda777 100644 --- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 | |||
| @@ -52,7 +52,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], | |||
| 52 | dnl (in <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only | 52 | dnl (in <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only |
| 53 | dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is | 53 | dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is |
| 54 | dnl smaller than the 'time_t' type mandated by POSIX. | 54 | dnl smaller than the 'time_t' type mandated by POSIX. |
| 55 | AC_CACHE_CHECK([for correct struct timeval.tv_sec member], | 55 | dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but |
| 56 | dnl that is good enough. | ||
| 57 | AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member], | ||
| 56 | [gl_cv_sys_struct_timeval_tv_sec], | 58 | [gl_cv_sys_struct_timeval_tv_sec], |
| 57 | [AC_COMPILE_IFELSE( | 59 | [AC_COMPILE_IFELSE( |
| 58 | [AC_LANG_PROGRAM( | 60 | [AC_LANG_PROGRAM( |
| @@ -65,7 +67,9 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], | |||
| 65 | #endif | 67 | #endif |
| 66 | ]], | 68 | ]], |
| 67 | [[static struct timeval x; | 69 | [[static struct timeval x; |
| 68 | typedef int verify_tv_sec_type[sizeof (x.tv_sec) == sizeof (time_t) ? 1 : -1]; | 70 | typedef int verify_tv_sec_type[ |
| 71 | sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 | ||
| 72 | ]; | ||
| 69 | ]])], | 73 | ]])], |
| 70 | [gl_cv_sys_struct_timeval_tv_sec=yes], | 74 | [gl_cv_sys_struct_timeval_tv_sec=yes], |
| 71 | [gl_cv_sys_struct_timeval_tv_sec=no]) | 75 | [gl_cv_sys_struct_timeval_tv_sec=no]) |
diff --git a/src/ChangeLog b/src/ChangeLog index 7189f930333..af51c9a100a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2012-07-06 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Port to OpenBSD 5.1 amd64. | ||
| 4 | * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>. | ||
| 5 | This is needed for OpenBSD, and should be harmless on all BSD systems. | ||
| 6 | Also, include <sys/sysctl.h>, as it should be available on all | ||
| 7 | BSD_SYSTEM hosts given that we're already calling sysctl in that case. | ||
| 8 | (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but | ||
| 9 | use p_pid member, not kp_proc.pid. | ||
| 10 | |||
| 1 | 2012-07-06 Glenn Morris <rgm@gnu.org> | 11 | 2012-07-06 Glenn Morris <rgm@gnu.org> |
| 2 | 12 | ||
| 3 | * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows. | 13 | * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows. |
diff --git a/src/sysdep.c b/src/sysdep.c index 7a4fa9aa5f7..63bf680f17f 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -38,17 +38,17 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 38 | #include "sysselect.h" | 38 | #include "sysselect.h" |
| 39 | #include "blockinput.h" | 39 | #include "blockinput.h" |
| 40 | 40 | ||
| 41 | #ifdef __FreeBSD__ | 41 | #ifdef BSD_SYSTEM |
| 42 | #include <sys/param.h> | ||
| 42 | #include <sys/sysctl.h> | 43 | #include <sys/sysctl.h> |
| 44 | #endif | ||
| 45 | |||
| 46 | #ifdef __FreeBSD__ | ||
| 43 | #include <sys/user.h> | 47 | #include <sys/user.h> |
| 44 | #include <sys/resource.h> | 48 | #include <sys/resource.h> |
| 45 | #include <math.h> | 49 | #include <math.h> |
| 46 | #endif | 50 | #endif |
| 47 | 51 | ||
| 48 | #ifdef DARWIN_OS | ||
| 49 | #include <sys/sysctl.h> | ||
| 50 | #endif | ||
| 51 | |||
| 52 | #ifdef WINDOWSNT | 52 | #ifdef WINDOWSNT |
| 53 | #define read sys_read | 53 | #define read sys_read |
| 54 | #define write sys_write | 54 | #define write sys_write |
| @@ -2520,7 +2520,7 @@ list_system_processes (void) | |||
| 2520 | Lisp_Object | 2520 | Lisp_Object |
| 2521 | list_system_processes (void) | 2521 | list_system_processes (void) |
| 2522 | { | 2522 | { |
| 2523 | #ifdef DARWIN_OS | 2523 | #if defined DARWIN_OS || defined __OpenBSD__ |
| 2524 | int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL}; | 2524 | int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL}; |
| 2525 | #else | 2525 | #else |
| 2526 | int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC}; | 2526 | int mib[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC}; |
| @@ -2548,6 +2548,8 @@ list_system_processes (void) | |||
| 2548 | { | 2548 | { |
| 2549 | #ifdef DARWIN_OS | 2549 | #ifdef DARWIN_OS |
| 2550 | proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid), proclist); | 2550 | proclist = Fcons (make_fixnum_or_float (procs[i].kp_proc.p_pid), proclist); |
| 2551 | #elif defined __OpenBSD__ | ||
| 2552 | proclist = Fcons (make_fixnum_or_float (procs[i].p_pid), proclist); | ||
| 2551 | #else | 2553 | #else |
| 2552 | proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist); | 2554 | proclist = Fcons (make_fixnum_or_float (procs[i].ki_pid), proclist); |
| 2553 | #endif | 2555 | #endif |