diff options
author | Jim Blandy <jimb@redhat.com> | 1992-09-13 10:54:38 +0000 |
---|---|---|
committer | Jim Blandy <jimb@redhat.com> | 1992-09-13 10:54:38 +0000 |
commit | f8a2cfe1da5e6492a6a93442ca1bbce7a1f99b1f (patch) | |
tree | 8fbfa541ce4c6b00a684bd2a75c73fed06cd50ce /src | |
parent | a48b35e69df1d1c24baa021ec481387b1ebbb150 (diff) | |
download | emacs-f8a2cfe1da5e6492a6a93442ca1bbce7a1f99b1f.tar.gz |
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r-- | src/m/hp9000s300.h | 49 | ||||
-rw-r--r-- | src/s/bsd4-3.h | 7 | ||||
-rw-r--r-- | src/systime.h | 44 |
3 files changed, 60 insertions, 40 deletions
diff --git a/src/m/hp9000s300.h b/src/m/hp9000s300.h index 233f6f7b207..9663a5b4743 100644 --- a/src/m/hp9000s300.h +++ b/src/m/hp9000s300.h @@ -29,13 +29,21 @@ HP 9000 series 200 or 300 (-machine=hp9000s300) (a derivative of sysV with some BSD features) or BSD 4.3 ported by Utah. If you're running HP-UX, specify `-opsystem=hpux'. - - If you're running Utah's BSD port, don't use this -machine option; - instead, specify `-machine=hp300bsd' and `-opsystem=bsd4-3'. + If you're running BSD, specify `-opsystem=bsd4-3'. NOTE-END */ -/* Define this symbol if you are running a version of HP-UX - which predates version 6.5 */ +/* Do this here at the top of the file; including sys/wait.h may + include <endian.h>, which defines BIG_ENDIAN, which will conflict + with our definition of BIG_ENDIAN if we do this at the bottom. */ +#ifndef NOT_C_CODE +#ifndef NO_SHORTNAMES +#include <sys/wait.h> +#define WAITTYPE int +#endif +#define WRETCODE(w) (((w) >> 8) & 0377) +#endif + +/* Define NOMULTIPLEJOBS on versions of HPUX before 6.5. */ /* #define NOMULTIPLEJOBS */ @@ -55,8 +63,10 @@ NOTE-END */ /* Define BIG_ENDIAN iff lowest-numbered byte in a word is the most significant byte. */ - +/* Under BSD, <endian.h> defines this. */ +#ifndef BIG_ENDIAN #define BIG_ENDIAN +#endif /* Define NO_ARG_ARRAY if you cannot take the address of the first of a * group of arguments and treat it as an array of the arguments. */ @@ -108,8 +118,11 @@ NOTE-END */ a very old, brain-dead version of PCC. */ #ifdef BSD4_3 + /* Tell crt0.c that this is an ordinary 68020. */ #undef hp9000s300 +#define m68000 + #define CRT0_DUMMIES bogus_a6, #define HAVE_ALLOCA @@ -167,21 +180,23 @@ NOTE-END */ #endif /* Define the BSTRING functions in terms of the sysV functions. - Version 6 of HP-UX supplies these in the BSD library. */ + Version 6 of HP-UX supplies these in the BSD library, + but that library has reported bugs in `signal'. */ -#ifdef HPUX_5 +/* #ifdef HPUX_5 */ #define bcopy(a,b,s) memcpy (b,a,s) #define bzero(a,s) memset (a,0,s) #define bcmp memcmp -#endif +/* #endif */ /* On USG systems these have different names. - Version 6 of HP-UX supplies these in the BSD library. */ + Version 6 of HP-UX supplies these in the BSD library, + which we currently want to avoid using. */ -#ifdef HPUX_5 +/* #ifdef HPUX_5 */ #define index strchr #define rindex strrchr -#endif +/* #endif */ /* Define C_SWITCH_MACHINE to be +X if you want the s200/300 * Emacs to run on both 68010 and 68020 based hp-ux's. @@ -202,18 +217,10 @@ NOTE-END */ #endif #endif -#endif /* not BSD4_3 */ - /* Define NEED_BSDTTY if you have such. */ #ifndef NOMULTIPLEJOBS #define NEED_BSDTTY #endif -#ifndef NOT_C_CODE -#ifndef NO_SHORTNAMES -#include <sys/wait.h> -#define WAITTYPE int -#endif -#define WRETCODE(w) (((w) >> 8) & 0377) -#endif +#endif /* not BSD4_3 */ diff --git a/src/s/bsd4-3.h b/src/s/bsd4-3.h index 332bbaa3856..583e6eb05a9 100644 --- a/src/s/bsd4-3.h +++ b/src/s/bsd4-3.h @@ -24,11 +24,11 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ */ #ifndef BSD4_3 -#define BSD 43 /* 4.3 * 10, as cpp doesn't do floats */ +#define BSD4_3 #endif /* BSD4_3 */ #ifndef BSD -#define BSD4_3 1 +#define BSD #endif /* BSD */ /* SYSTEM_TYPE should indicate the kind of system you are using. @@ -127,6 +127,3 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ is named _avenrun. */ #define LDAV_SYMBOL "_avenrun" - -/* The return type of a signal handling function. */ -#define SIGTYPE int diff --git a/src/systime.h b/src/systime.h index 9dab2deacfa..787c51d89ab 100644 --- a/src/systime.h +++ b/src/systime.h @@ -17,8 +17,6 @@ You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef NEED_TIME_H - /* _h_BSDTYPES is checked because on ISC unix, socket.h includes both time.h and sys/time.h, and the later file is protected from repeated inclusion. We just hope that other systems will @@ -26,11 +24,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _h_BSDTYPES #include <time.h> #endif /* _h_BSDTYPES */ -#else /* ! defined (NEED_TIME_H) */ + #ifdef HAVE_TIMEVAL +#ifndef NEED_TIME_H /* Some versions of HP/UX shouldn't have + this included; time.h should do the trick + instead. */ #include <sys/time.h> -#endif /* ! defined (HAVE_TIMEVAL) */ -#endif /* ! defined (NEED_TIME_H) */ +#endif +#endif /* EMACS_TIME is the type to use to represent temporal intervals - @@ -145,7 +146,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ expands to a statement which stores information about the current time zone in its arguments. - *OFFSET is set to the number of minutes west of Greenwich at which + *OFFSET is set to the number of minutes EAST of Greenwich at which the site's time zone is located. This should describe the offset to standard time only; if some sort of daylight savings time is in effect, that should not affect this value. Note that the tm_gmtoff @@ -178,17 +179,24 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* If we have timeval, then we have gettimeofday; that's half the battle. */ #ifdef HAVE_TIMEVAL -#define EMACS_GET_TZ_OFFSET_AND_SAVINGS(offset, savings_flag) \ +#define EMACS_GET_TZ_OFFSET(offset) \ do { \ struct timeval dummy; \ struct timezone zoneinfo; \ \ gettimeofday (&dummy, &zoneinfo); \ - *(offset) = zoneinfo.tz_minuteswest; \ - *(savings_flag) = zoneinfo.tz_dsttime; \ + *(offset) = -zoneinfo.tz_minuteswest; \ } while (0) #endif /* ! defined (HAVE_TIMEVAL) */ +/* System V derivatives have a timezone global variable. */ +#ifdef USG +#define EMACS_GET_TZ_OFFSET(offset) \ + do { \ + tzset (); \ + (offset) = timezone; \ + } +#endif /* The following sane systems have a tzname array. The timezone() function is a stupid idea; timezone names can only be determined geographically, @@ -222,14 +230,22 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #endif /* ! defined (ultrix) || defined (hpux) || defined (_AIX) */ /* If we can get all the information we need, let's define the macro! */ -#if defined (EMACS_GET_TZ_OFFSET_AND_SAVINGS) && defined (EMACS_GET_TZ_NAMES) +#if defined (EMACS_GET_TZ_OFFSET) && defined (EMACS_GET_TZ_NAMES) #define EMACS_CURRENT_TIME_ZONE(offset, savings_flag, standard, savings)\ - do { \ - EMACS_GET_TZ_OFFSET_AND_SAVINGS (offset, savings_flag); \ + do { \ + EMACS_TIME t; \ + long secs; \ + struct tm *tmp; \ + \ + EMACS_GET_TIME (t); \ + secs = EMACS_SECS (t); \ + tmp = localtime (&secs); \ + *(savings_flag) = tmp->tm_isdst; \ + \ + EMACS_GET_TZ_OFFSET (offset); \ EMACS_GET_TZ_NAMES (standard, savings); \ } while (0) - -#endif /* ! defined (EMACS_GET_TZ_OFFSET_AND_SAVINGS) && defined (EMACS_GET_TZ_NAMES) */ +#endif /* ! defined (EMACS_GET_TZ_OFFSET) && defined (EMACS_GET_TZ_NAMES) */ #endif /* EMACS_CURRENT_TIME_ZONE */ |