diff options
| author | Jim Blandy | 1992-09-13 10:54:38 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-09-13 10:54:38 +0000 |
| commit | b7cceaf12a73559df9c2fcf135983b4c03b48061 (patch) | |
| tree | de45679165e29811fe12d574dbcba2d325a1ceef /src | |
| parent | e4801b31ff4d1c01f79e25a2eefbd3877375386b (diff) | |
| download | emacs-b7cceaf12a73559df9c2fcf135983b4c03b48061.tar.gz emacs-b7cceaf12a73559df9c2fcf135983b4c03b48061.zip | |
*** 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) | |||
| 29 | (a derivative of sysV with some BSD features) or BSD 4.3 ported by Utah. | 29 | (a derivative of sysV with some BSD features) or BSD 4.3 ported by Utah. |
| 30 | 30 | ||
| 31 | If you're running HP-UX, specify `-opsystem=hpux'. | 31 | If you're running HP-UX, specify `-opsystem=hpux'. |
| 32 | 32 | If you're running BSD, specify `-opsystem=bsd4-3'. | |
| 33 | If you're running Utah's BSD port, don't use this -machine option; | ||
| 34 | instead, specify `-machine=hp300bsd' and `-opsystem=bsd4-3'. | ||
| 35 | NOTE-END */ | 33 | NOTE-END */ |
| 36 | 34 | ||
| 37 | /* Define this symbol if you are running a version of HP-UX | 35 | /* Do this here at the top of the file; including sys/wait.h may |
| 38 | which predates version 6.5 */ | 36 | include <endian.h>, which defines BIG_ENDIAN, which will conflict |
| 37 | with our definition of BIG_ENDIAN if we do this at the bottom. */ | ||
| 38 | #ifndef NOT_C_CODE | ||
| 39 | #ifndef NO_SHORTNAMES | ||
| 40 | #include <sys/wait.h> | ||
| 41 | #define WAITTYPE int | ||
| 42 | #endif | ||
| 43 | #define WRETCODE(w) (((w) >> 8) & 0377) | ||
| 44 | #endif | ||
| 45 | |||
| 46 | /* Define NOMULTIPLEJOBS on versions of HPUX before 6.5. */ | ||
| 39 | 47 | ||
| 40 | /* #define NOMULTIPLEJOBS */ | 48 | /* #define NOMULTIPLEJOBS */ |
| 41 | 49 | ||
| @@ -55,8 +63,10 @@ NOTE-END */ | |||
| 55 | 63 | ||
| 56 | /* Define BIG_ENDIAN iff lowest-numbered byte in a word | 64 | /* Define BIG_ENDIAN iff lowest-numbered byte in a word |
| 57 | is the most significant byte. */ | 65 | is the most significant byte. */ |
| 58 | 66 | /* Under BSD, <endian.h> defines this. */ | |
| 67 | #ifndef BIG_ENDIAN | ||
| 59 | #define BIG_ENDIAN | 68 | #define BIG_ENDIAN |
| 69 | #endif | ||
| 60 | 70 | ||
| 61 | /* Define NO_ARG_ARRAY if you cannot take the address of the first of a | 71 | /* Define NO_ARG_ARRAY if you cannot take the address of the first of a |
| 62 | * group of arguments and treat it as an array of the arguments. */ | 72 | * group of arguments and treat it as an array of the arguments. */ |
| @@ -108,8 +118,11 @@ NOTE-END */ | |||
| 108 | a very old, brain-dead version of PCC. */ | 118 | a very old, brain-dead version of PCC. */ |
| 109 | 119 | ||
| 110 | #ifdef BSD4_3 | 120 | #ifdef BSD4_3 |
| 121 | |||
| 111 | /* Tell crt0.c that this is an ordinary 68020. */ | 122 | /* Tell crt0.c that this is an ordinary 68020. */ |
| 112 | #undef hp9000s300 | 123 | #undef hp9000s300 |
| 124 | #define m68000 | ||
| 125 | |||
| 113 | #define CRT0_DUMMIES bogus_a6, | 126 | #define CRT0_DUMMIES bogus_a6, |
| 114 | 127 | ||
| 115 | #define HAVE_ALLOCA | 128 | #define HAVE_ALLOCA |
| @@ -167,21 +180,23 @@ NOTE-END */ | |||
| 167 | #endif | 180 | #endif |
| 168 | 181 | ||
| 169 | /* Define the BSTRING functions in terms of the sysV functions. | 182 | /* Define the BSTRING functions in terms of the sysV functions. |
| 170 | Version 6 of HP-UX supplies these in the BSD library. */ | 183 | Version 6 of HP-UX supplies these in the BSD library, |
| 184 | but that library has reported bugs in `signal'. */ | ||
| 171 | 185 | ||
| 172 | #ifdef HPUX_5 | 186 | /* #ifdef HPUX_5 */ |
| 173 | #define bcopy(a,b,s) memcpy (b,a,s) | 187 | #define bcopy(a,b,s) memcpy (b,a,s) |
| 174 | #define bzero(a,s) memset (a,0,s) | 188 | #define bzero(a,s) memset (a,0,s) |
| 175 | #define bcmp memcmp | 189 | #define bcmp memcmp |
| 176 | #endif | 190 | /* #endif */ |
| 177 | 191 | ||
| 178 | /* On USG systems these have different names. | 192 | /* On USG systems these have different names. |
| 179 | Version 6 of HP-UX supplies these in the BSD library. */ | 193 | Version 6 of HP-UX supplies these in the BSD library, |
| 194 | which we currently want to avoid using. */ | ||
| 180 | 195 | ||
| 181 | #ifdef HPUX_5 | 196 | /* #ifdef HPUX_5 */ |
| 182 | #define index strchr | 197 | #define index strchr |
| 183 | #define rindex strrchr | 198 | #define rindex strrchr |
| 184 | #endif | 199 | /* #endif */ |
| 185 | 200 | ||
| 186 | /* Define C_SWITCH_MACHINE to be +X if you want the s200/300 | 201 | /* Define C_SWITCH_MACHINE to be +X if you want the s200/300 |
| 187 | * Emacs to run on both 68010 and 68020 based hp-ux's. | 202 | * Emacs to run on both 68010 and 68020 based hp-ux's. |
| @@ -202,18 +217,10 @@ NOTE-END */ | |||
| 202 | #endif | 217 | #endif |
| 203 | #endif | 218 | #endif |
| 204 | 219 | ||
| 205 | #endif /* not BSD4_3 */ | ||
| 206 | |||
| 207 | /* Define NEED_BSDTTY if you have such. */ | 220 | /* Define NEED_BSDTTY if you have such. */ |
| 208 | 221 | ||
| 209 | #ifndef NOMULTIPLEJOBS | 222 | #ifndef NOMULTIPLEJOBS |
| 210 | #define NEED_BSDTTY | 223 | #define NEED_BSDTTY |
| 211 | #endif | 224 | #endif |
| 212 | 225 | ||
| 213 | #ifndef NOT_C_CODE | 226 | #endif /* not BSD4_3 */ |
| 214 | #ifndef NO_SHORTNAMES | ||
| 215 | #include <sys/wait.h> | ||
| 216 | #define WAITTYPE int | ||
| 217 | #endif | ||
| 218 | #define WRETCODE(w) (((w) >> 8) & 0377) | ||
| 219 | #endif | ||
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. */ | |||
| 24 | */ | 24 | */ |
| 25 | 25 | ||
| 26 | #ifndef BSD4_3 | 26 | #ifndef BSD4_3 |
| 27 | #define BSD 43 /* 4.3 * 10, as cpp doesn't do floats */ | 27 | #define BSD4_3 |
| 28 | #endif /* BSD4_3 */ | 28 | #endif /* BSD4_3 */ |
| 29 | 29 | ||
| 30 | #ifndef BSD | 30 | #ifndef BSD |
| 31 | #define BSD4_3 1 | 31 | #define BSD |
| 32 | #endif /* BSD */ | 32 | #endif /* BSD */ |
| 33 | 33 | ||
| 34 | /* SYSTEM_TYPE should indicate the kind of system you are using. | 34 | /* 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. */ | |||
| 127 | is named _avenrun. */ | 127 | is named _avenrun. */ |
| 128 | 128 | ||
| 129 | #define LDAV_SYMBOL "_avenrun" | 129 | #define LDAV_SYMBOL "_avenrun" |
| 130 | |||
| 131 | /* The return type of a signal handling function. */ | ||
| 132 | #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 | |||
| 17 | along with GNU Emacs; see the file COPYING. If not, write to | 17 | along with GNU Emacs; see the file COPYING. If not, write to |
| 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | 18 | the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ |
| 19 | 19 | ||
| 20 | #ifdef NEED_TIME_H | ||
| 21 | |||
| 22 | /* _h_BSDTYPES is checked because on ISC unix, socket.h includes | 20 | /* _h_BSDTYPES is checked because on ISC unix, socket.h includes |
| 23 | both time.h and sys/time.h, and the later file is protected | 21 | both time.h and sys/time.h, and the later file is protected |
| 24 | from repeated inclusion. We just hope that other systems will | 22 | 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. */ | |||
| 26 | #ifndef _h_BSDTYPES | 24 | #ifndef _h_BSDTYPES |
| 27 | #include <time.h> | 25 | #include <time.h> |
| 28 | #endif /* _h_BSDTYPES */ | 26 | #endif /* _h_BSDTYPES */ |
| 29 | #else /* ! defined (NEED_TIME_H) */ | 27 | |
| 30 | #ifdef HAVE_TIMEVAL | 28 | #ifdef HAVE_TIMEVAL |
| 29 | #ifndef NEED_TIME_H /* Some versions of HP/UX shouldn't have | ||
| 30 | this included; time.h should do the trick | ||
| 31 | instead. */ | ||
| 31 | #include <sys/time.h> | 32 | #include <sys/time.h> |
| 32 | #endif /* ! defined (HAVE_TIMEVAL) */ | 33 | #endif |
| 33 | #endif /* ! defined (NEED_TIME_H) */ | 34 | #endif |
| 34 | 35 | ||
| 35 | 36 | ||
| 36 | /* EMACS_TIME is the type to use to represent temporal intervals - | 37 | /* 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. */ | |||
| 145 | expands to a statement which stores information about the current | 146 | expands to a statement which stores information about the current |
| 146 | time zone in its arguments. | 147 | time zone in its arguments. |
| 147 | 148 | ||
| 148 | *OFFSET is set to the number of minutes west of Greenwich at which | 149 | *OFFSET is set to the number of minutes EAST of Greenwich at which |
| 149 | the site's time zone is located. This should describe the offset | 150 | the site's time zone is located. This should describe the offset |
| 150 | to standard time only; if some sort of daylight savings time is in | 151 | to standard time only; if some sort of daylight savings time is in |
| 151 | effect, that should not affect this value. Note that the tm_gmtoff | 152 | 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. */ | |||
| 178 | 179 | ||
| 179 | /* If we have timeval, then we have gettimeofday; that's half the battle. */ | 180 | /* If we have timeval, then we have gettimeofday; that's half the battle. */ |
| 180 | #ifdef HAVE_TIMEVAL | 181 | #ifdef HAVE_TIMEVAL |
| 181 | #define EMACS_GET_TZ_OFFSET_AND_SAVINGS(offset, savings_flag) \ | 182 | #define EMACS_GET_TZ_OFFSET(offset) \ |
| 182 | do { \ | 183 | do { \ |
| 183 | struct timeval dummy; \ | 184 | struct timeval dummy; \ |
| 184 | struct timezone zoneinfo; \ | 185 | struct timezone zoneinfo; \ |
| 185 | \ | 186 | \ |
| 186 | gettimeofday (&dummy, &zoneinfo); \ | 187 | gettimeofday (&dummy, &zoneinfo); \ |
| 187 | *(offset) = zoneinfo.tz_minuteswest; \ | 188 | *(offset) = -zoneinfo.tz_minuteswest; \ |
| 188 | *(savings_flag) = zoneinfo.tz_dsttime; \ | ||
| 189 | } while (0) | 189 | } while (0) |
| 190 | #endif /* ! defined (HAVE_TIMEVAL) */ | 190 | #endif /* ! defined (HAVE_TIMEVAL) */ |
| 191 | 191 | ||
| 192 | /* System V derivatives have a timezone global variable. */ | ||
| 193 | #ifdef USG | ||
| 194 | #define EMACS_GET_TZ_OFFSET(offset) \ | ||
| 195 | do { \ | ||
| 196 | tzset (); \ | ||
| 197 | (offset) = timezone; \ | ||
| 198 | } | ||
| 199 | #endif | ||
| 192 | 200 | ||
| 193 | /* The following sane systems have a tzname array. The timezone() function | 201 | /* The following sane systems have a tzname array. The timezone() function |
| 194 | is a stupid idea; timezone names can only be determined geographically, | 202 | 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. */ | |||
| 222 | #endif /* ! defined (ultrix) || defined (hpux) || defined (_AIX) */ | 230 | #endif /* ! defined (ultrix) || defined (hpux) || defined (_AIX) */ |
| 223 | 231 | ||
| 224 | /* If we can get all the information we need, let's define the macro! */ | 232 | /* If we can get all the information we need, let's define the macro! */ |
| 225 | #if defined (EMACS_GET_TZ_OFFSET_AND_SAVINGS) && defined (EMACS_GET_TZ_NAMES) | 233 | #if defined (EMACS_GET_TZ_OFFSET) && defined (EMACS_GET_TZ_NAMES) |
| 226 | 234 | ||
| 227 | #define EMACS_CURRENT_TIME_ZONE(offset, savings_flag, standard, savings)\ | 235 | #define EMACS_CURRENT_TIME_ZONE(offset, savings_flag, standard, savings)\ |
| 228 | do { \ | 236 | do { \ |
| 229 | EMACS_GET_TZ_OFFSET_AND_SAVINGS (offset, savings_flag); \ | 237 | EMACS_TIME t; \ |
| 238 | long secs; \ | ||
| 239 | struct tm *tmp; \ | ||
| 240 | \ | ||
| 241 | EMACS_GET_TIME (t); \ | ||
| 242 | secs = EMACS_SECS (t); \ | ||
| 243 | tmp = localtime (&secs); \ | ||
| 244 | *(savings_flag) = tmp->tm_isdst; \ | ||
| 245 | \ | ||
| 246 | EMACS_GET_TZ_OFFSET (offset); \ | ||
| 230 | EMACS_GET_TZ_NAMES (standard, savings); \ | 247 | EMACS_GET_TZ_NAMES (standard, savings); \ |
| 231 | } while (0) | 248 | } while (0) |
| 232 | 249 | #endif /* ! defined (EMACS_GET_TZ_OFFSET) && defined (EMACS_GET_TZ_NAMES) */ | |
| 233 | #endif /* ! defined (EMACS_GET_TZ_OFFSET_AND_SAVINGS) && defined (EMACS_GET_TZ_NAMES) */ | ||
| 234 | 250 | ||
| 235 | #endif /* EMACS_CURRENT_TIME_ZONE */ | 251 | #endif /* EMACS_CURRENT_TIME_ZONE */ |