diff options
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/lisp.h b/src/lisp.h index 762d34abb9c..1e141dbb5d0 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -61,6 +61,23 @@ extern void check_cons_list (void); | |||
| 61 | # define EMACS_UINT unsigned EMACS_INT | 61 | # define EMACS_UINT unsigned EMACS_INT |
| 62 | #endif | 62 | #endif |
| 63 | 63 | ||
| 64 | /* printmax_t and uprintmax_t are types for printing large integers. | ||
| 65 | These are the widest integers that are supported for printing. | ||
| 66 | pMd etc. are conversions for printing them. | ||
| 67 | On C99 hosts, there's no problem, as even the widest integers work. | ||
| 68 | Fall back on EMACS_INT on pre-C99 hosts. */ | ||
| 69 | #ifdef PRIdMAX | ||
| 70 | typedef intmax_t printmax_t; | ||
| 71 | typedef uintmax_t uprintmax_t; | ||
| 72 | # define pMd PRIdMAX | ||
| 73 | # define pMu PRIuMAX | ||
| 74 | #else | ||
| 75 | typedef EMACS_INT printmax_t; | ||
| 76 | typedef EMACS_UINT uprintmax_t; | ||
| 77 | # define pMd pI"d" | ||
| 78 | # define pMu pI"u" | ||
| 79 | #endif | ||
| 80 | |||
| 64 | /* Use pD to format ptrdiff_t values, which suffice for indexes into | 81 | /* Use pD to format ptrdiff_t values, which suffice for indexes into |
| 65 | buffers and strings. Emacs never allocates objects larger than | 82 | buffers and strings. Emacs never allocates objects larger than |
| 66 | PTRDIFF_MAX bytes, as they cause problems with pointer subtraction. | 83 | PTRDIFF_MAX bytes, as they cause problems with pointer subtraction. |
| @@ -833,7 +850,7 @@ struct Lisp_String | |||
| 833 | <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8546>. */ | 850 | <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8546>. */ |
| 834 | struct vectorlike_header | 851 | struct vectorlike_header |
| 835 | { | 852 | { |
| 836 | EMACS_UINT size; | 853 | EMACS_INT size; |
| 837 | 854 | ||
| 838 | /* Pointer to the next vector-like object. It is generally a buffer or a | 855 | /* Pointer to the next vector-like object. It is generally a buffer or a |
| 839 | Lisp_Vector alias, so for convenience it is a union instead of a | 856 | Lisp_Vector alias, so for convenience it is a union instead of a |
| @@ -1028,7 +1045,7 @@ struct Lisp_Bool_Vector | |||
| 1028 | 1045 | ||
| 1029 | struct Lisp_Subr | 1046 | struct Lisp_Subr |
| 1030 | { | 1047 | { |
| 1031 | EMACS_UINT size; | 1048 | EMACS_INT size; |
| 1032 | union { | 1049 | union { |
| 1033 | Lisp_Object (*a0) (void); | 1050 | Lisp_Object (*a0) (void); |
| 1034 | Lisp_Object (*a1) (Lisp_Object); | 1051 | Lisp_Object (*a1) (Lisp_Object); |
| @@ -2540,6 +2557,7 @@ extern void sweep_weak_hash_tables (void); | |||
| 2540 | extern Lisp_Object Qcursor_in_echo_area; | 2557 | extern Lisp_Object Qcursor_in_echo_area; |
| 2541 | extern Lisp_Object Qstring_lessp; | 2558 | extern Lisp_Object Qstring_lessp; |
| 2542 | extern Lisp_Object QCsize, QCtest, QCweakness, Qequal, Qeq, Qeql; | 2559 | extern Lisp_Object QCsize, QCtest, QCweakness, Qequal, Qeq, Qeql; |
| 2560 | EMACS_UINT hash_string (char const *, ptrdiff_t); | ||
| 2543 | EMACS_UINT sxhash (Lisp_Object, int); | 2561 | EMACS_UINT sxhash (Lisp_Object, int); |
| 2544 | Lisp_Object make_hash_table (Lisp_Object, Lisp_Object, Lisp_Object, | 2562 | Lisp_Object make_hash_table (Lisp_Object, Lisp_Object, Lisp_Object, |
| 2545 | Lisp_Object, Lisp_Object, Lisp_Object, | 2563 | Lisp_Object, Lisp_Object, Lisp_Object, |
| @@ -2868,7 +2886,8 @@ extern void float_to_string (char *, double); | |||
| 2868 | extern void syms_of_print (void); | 2886 | extern void syms_of_print (void); |
| 2869 | 2887 | ||
| 2870 | /* Defined in doprnt.c */ | 2888 | /* Defined in doprnt.c */ |
| 2871 | extern size_t doprnt (char *, size_t, const char *, const char *, va_list); | 2889 | extern ptrdiff_t doprnt (char *, ptrdiff_t, const char *, const char *, |
| 2890 | va_list); | ||
| 2872 | 2891 | ||
| 2873 | /* Defined in lread.c. */ | 2892 | /* Defined in lread.c. */ |
| 2874 | extern Lisp_Object Qvariable_documentation, Qstandard_input; | 2893 | extern Lisp_Object Qvariable_documentation, Qstandard_input; |
| @@ -3429,18 +3448,6 @@ extern EMACS_INT emacs_read (int, char *, EMACS_INT); | |||
| 3429 | extern EMACS_INT emacs_write (int, const char *, EMACS_INT); | 3448 | extern EMACS_INT emacs_write (int, const char *, EMACS_INT); |
| 3430 | enum { READLINK_BUFSIZE = 1024 }; | 3449 | enum { READLINK_BUFSIZE = 1024 }; |
| 3431 | extern char *emacs_readlink (const char *, char [READLINK_BUFSIZE]); | 3450 | extern char *emacs_readlink (const char *, char [READLINK_BUFSIZE]); |
| 3432 | #ifndef HAVE_MEMSET | ||
| 3433 | extern void *memset (void *, int, size_t); | ||
| 3434 | #endif | ||
| 3435 | #ifndef HAVE_MEMCPY | ||
| 3436 | extern void *memcpy (void *, void *, size_t); | ||
| 3437 | #endif | ||
| 3438 | #ifndef HAVE_MEMMOVE | ||
| 3439 | extern void *memmove (void *, void *, size_t); | ||
| 3440 | #endif | ||
| 3441 | #ifndef HAVE_MEMCMP | ||
| 3442 | extern int memcmp (void *, void *, size_t); | ||
| 3443 | #endif | ||
| 3444 | 3451 | ||
| 3445 | EXFUN (Funlock_buffer, 0); | 3452 | EXFUN (Funlock_buffer, 0); |
| 3446 | extern void unlock_all_files (void); | 3453 | extern void unlock_all_files (void); |