bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8794: (b) make the 64bit-on-32bit the default (if supported)


From: Stefan Monnier
Subject: bug#8794: (b) make the 64bit-on-32bit the default (if supported)
Date: Mon, 06 Jun 2011 11:52:39 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

severity 8794 wishlist
tags 8794 +patch
thanks

As mentioned earlier, I don't think we want to install this right now,
so let's keep it as an option for now and reconsider this choice for
Emacs-24.2.  We should make a --with-wide-int option for ./configure, tho.


        Stefan


>>>>> "Paul" == Paul Eggert <eggert@cs.ucla.edu> writes:

> Almost all of this is documentation change.  The only code change
> is the lisp.h change to the default.


> === modified file 'doc/emacs/ChangeLog'
> --- doc/emacs/ChangeLog       2011-05-28 18:22:08 +0000
> +++ doc/emacs/ChangeLog       2011-06-03 18:47:14 +0000
> @@ -1,3 +1,9 @@
> +2011-06-02  Paul Eggert  <eggert@cs.ucla.edu>
> +
> +     Document wide integers better.
> +     * buffers.texi (Buffers):
> +     * files.texi (Visiting): Default buffer maximum is now 2 EiB typically.
> +
>  2011-05-28  Chong Yidong  <cyd@stupidchicken.com>
 
>       * custom.texi (Hooks): Reorganize.  Mention Prog mode.

> === modified file 'doc/emacs/buffers.texi'
> --- doc/emacs/buffers.texi    2011-01-25 04:08:28 +0000
> +++ doc/emacs/buffers.texi    2011-06-03 18:47:14 +0000
> @@ -43,8 +43,11 @@
>    A buffer's size cannot be larger than some maximum, which is defined
>  by the largest buffer position representable by the @dfn{Emacs
>  integer} data type.  This is because Emacs tracks buffer positions
> -using that data type.  For 32-bit machines, the largest buffer size is
> -512 megabytes.
> +using that data type.  For most machines, the maximum buffer size
> +enforced by the data types is @math{2^61 - 2} bytes, or about 2 EiB.
> +For some older machines, the maximum is @math{2^29 - 2} bytes, or
> +about 512 MiB.  Buffer sizes are also limited by the size of Emacs's
> +virtual memory.
 
>  @menu
>  * Select Buffer::       Creating a new buffer or reselecting an old one.

> === modified file 'doc/emacs/files.texi'
> --- doc/emacs/files.texi      2011-01-31 23:54:50 +0000
> +++ doc/emacs/files.texi      2011-06-03 18:47:14 +0000
> @@ -209,7 +209,8 @@
>  about 10 megabytes), Emacs asks you for confirmation first.  You can
>  answer @kbd{y} to proceed with visiting the file.  Note, however, that
>  Emacs cannot visit files that are larger than the maximum Emacs buffer
> -size, which is around 512 megabytes on 32-bit machines
> +size, which is limited by the amount of memory Emacs can allocate
> +and by the integers that Emacs can represent
>  (@pxref{Buffers}).  If you try, Emacs will display an error message
>  saying that the maximum buffer size has been exceeded.
 

> === modified file 'doc/lispref/ChangeLog'
> --- doc/lispref/ChangeLog     2011-05-31 18:40:00 +0000
> +++ doc/lispref/ChangeLog     2011-06-03 18:49:33 +0000
> @@ -1,3 +1,12 @@
> +2011-06-03  Paul Eggert  <eggert@cs.ucla.edu>
> +
> +     Document wide integers better.
> +     * files.texi (File Attributes): Document ino_t values better.
> +     * numbers.texi (Integer Basics, Integer Basics, Arithmetic Operations):
> +     (Bitwise Operations):
> +     * objects.texi (Integer Type): Integers are typically 62 bits now.
> +     * os.texi (Time Conversion): Document time_t values better.
> +
>  2011-05-31  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
>       * processes.texi (Process Information): Document

> === modified file 'doc/lispref/files.texi'
> --- doc/lispref/files.texi    2011-05-12 07:07:06 +0000
> +++ doc/lispref/files.texi    2011-06-03 18:49:33 +0000
> @@ -1236,12 +1236,13 @@
 
>  @item
>  The file's inode number.  If possible, this is an integer.  If the
> -inode number is too large to be represented as an integer in Emacs
> -Lisp, but still fits into a 32-bit integer, then the value has the
> -form @code{(@var{high} . @var{low})}, where @var{low} holds the low 16
> -bits.  If the inode is wider than 32 bits, the value is of the form
> +inode number @math{N} is too large to be represented as an integer in
> +Emacs Lisp, but @math{N / 2^16} is representable, then the value has
> +the form @code{(@var{high} . @var{low})}, where @var{high} holds the
> +high bits (i.e., excluding the low-order bits) and @var{low} the low
> +16 bits.  If the inode number is even larger, the value is of the form
>  @code{(@var{high} @var{middle} . @var{low})}, where @code{high} holds
> -the high 24 bits, @var{middle} the next 24 bits, and @var{low} the low
> +the high bits, @var{middle} the next 24 bits, and @var{low} the low
>  16 bits.
 
>  @item

> === modified file 'doc/lispref/numbers.texi'
> --- doc/lispref/numbers.texi  2011-05-05 06:31:14 +0000
> +++ doc/lispref/numbers.texi  2011-06-03 18:49:33 +0000
> @@ -36,22 +36,24 @@
>  @section Integer Basics
 
>    The range of values for an integer depends on the machine.  The
> -minimum range is @minus{}536870912 to 536870911 (30 bits; i.e.,
> +typical range is @minus{}2305843009213693952 to 2305843009213693951
> +(62 bits; i.e.,
>  @ifnottex
> --2**29
> +-2**61
>  @end ifnottex
>  @tex
> -@math{-2^{29}}
> +@math{-2^{61}}
>  @end tex
>  to
>  @ifnottex
> -2**29 - 1),
> +2**61 - 1)
>  @end ifnottex
>  @tex
> -@math{2^{29}-1}),
> +@math{2^{61}-1})
>  @end tex
> -but some machines may provide a wider range.  Many examples in this
> -chapter assume an integer has 30 bits.
> +but some older machines provide only 30 bits.  Many examples in this
> +chapter assume that an integer has 62 bits and that floating point
> +numbers are IEEE double precision.
>  @cindex overflow
 
>    The Lisp reader reads an integer as a sequence of digits with optional
> @@ -63,7 +65,8 @@
>   1.              ; @r{The integer 1.}
>  +1               ; @r{Also the integer 1.}
>  -1               ; @r{The integer @minus{}1.}
> - 1073741825      ; @r{The floating point number 1073741825.0.}
> + 4611686018427387904
> +                 ; @r{The floating point number 4.611686018427388e+18.}
>   0               ; @r{The integer 0.}
>  -0               ; @r{The integer 0.}
>  @end example
> @@ -94,25 +97,21 @@
>  bitwise operators (@pxref{Bitwise Operations}), it is often helpful to
>  view the numbers in their binary form.
 
> -  In 30-bit binary, the decimal integer 5 looks like this:
> +  In 62-bit binary, the decimal integer 5 looks like this:
 
>  @example
> -00 0000  0000 0000  0000 0000  0000 0101
> +0000...000101 (62 bits total)
>  @end example
 
> -@noindent
> -(We have inserted spaces between groups of 4 bits, and two spaces
> -between groups of 8 bits, to make the binary integer easier to read.)
> -
>    The integer @minus{}1 looks like this:
 
>  @example
> -11 1111  1111 1111  1111 1111  1111 1111
> +1111...111111 (62 bits total)
>  @end example
 
>  @noindent
>  @cindex two's complement
> -@minus{}1 is represented as 30 ones.  (This is called @dfn{two's
> +@minus{}1 is represented as 62 ones.  (This is called @dfn{two's
>  complement} notation.)
 
>    The negative integer, @minus{}5, is creating by subtracting 4 from
> @@ -120,24 +119,24 @@
>  @minus{}5 looks like this:
 
>  @example
> -11 1111  1111 1111  1111 1111  1111 1011
> +1111...111011 (62 bits total)
>  @end example
 
> -  In this implementation, the largest 30-bit binary integer value is
> -536,870,911 in decimal.  In binary, it looks like this:
> +  In this implementation, the largest 62-bit binary integer value is
> +2,305,843,009,213,693,951 in decimal.  In binary, it looks like this:
 
>  @example
> -01 1111  1111 1111  1111 1111  1111 1111
> +0111...111111 (62 bits total)
>  @end example
 
>    Since the arithmetic functions do not check whether integers go
> -outside their range, when you add 1 to 536,870,911, the value is the
> -negative integer @minus{}536,870,912:
> +outside their range, when you add 1 to 2,305,843,009,213,693,951, the value 
> is the
> +negative integer @minus{}2,305,843,009,213,693,952:
 
>  @example
> -(+ 1 536870911)
> -     @result{} -536870912
> -     @result{} 10 0000  0000 0000  0000 0000  0000 0000
> +(+ 1 2305843009213693951)
> +     @result{} -2305843009213693952
> +     @result{} 1000...000000 (62 bits total)
>  @end example
 
>    Many of the functions described in this chapter accept markers for
> @@ -508,8 +507,8 @@
>  if any argument is floating.
 
>    It is important to note that in Emacs Lisp, arithmetic functions
> -do not check for overflow.  Thus @code{(1+ 268435455)} may evaluate to
> -@minus{}268435456, depending on your hardware.
> +do not check for overflow.  Thus @code{(1+ 2305843009213693951)} may
> +evaluate to @minus{}2305843009213693952, depending on your hardware.
 
>  @defun 1+ number-or-marker
>  This function returns @var{number-or-marker} plus 1.
> @@ -829,19 +828,19 @@
>  The function @code{lsh}, like all Emacs Lisp arithmetic functions, does
>  not check for overflow, so shifting left can discard significant bits
>  and change the sign of the number.  For example, left shifting
> -536,870,911 produces @minus{}2 on a 30-bit machine:
> +2,305,843,009,213,693,951 produces @minus{}2 on a typical machine:
 
>  @example
> -(lsh 536870911 1)          ; @r{left shift}
> +(lsh 2305843009213693951 1)  ; @r{left shift}
>       @result{} -2
>  @end example
 
> -In binary, in the 30-bit implementation, the argument looks like this:
> +In binary, in the 62-bit implementation, the argument looks like this:
 
>  @example
>  @group
> -;; @r{Decimal 536,870,911}
> -01 1111  1111 1111  1111 1111  1111 1111
> +;; @r{Decimal 2,305,843,009,213,693,951}
> +0111...111111 (62 bits total)
>  @end group
>  @end example
 
> @@ -851,7 +850,7 @@
>  @example
>  @group
>  ;; @r{Decimal @minus{}2}
> -11 1111  1111 1111  1111 1111  1111 1110
> +1111...111110 (62 bits total)
>  @end group
>  @end example
>  @end defun
> @@ -874,9 +873,9 @@
>  @group
>  (ash -6 -1) @result{} -3
>  ;; @r{Decimal @minus{}6 becomes decimal @minus{}3.}
> -11 1111  1111 1111  1111 1111  1111 1010
> +1111...111010 (62 bits total)
>       @result{}
> -11 1111  1111 1111  1111 1111  1111 1101
> +1111...111101 (62 bits total)
>  @end group
>  @end example
 
> @@ -885,11 +884,11 @@
 
>  @example
>  @group
> -(lsh -6 -1) @result{} 536870909
> -;; @r{Decimal @minus{}6 becomes decimal 536,870,909.}
> -11 1111  1111 1111  1111 1111  1111 1010
> +(lsh -6 -1) @result{} 2305843009213693949
> +;; @r{Decimal @minus{}6 becomes decimal 2,305,843,009,213,693,949.}
> +1111...111010 (62 bits total)
>       @result{}
> -01 1111  1111 1111  1111 1111  1111 1101
> +0111...111101 (62 bits total)
>  @end group
>  @end example
 
> @@ -899,34 +898,35 @@
>  @c     with smallbook but not with regular book! --rjc 16mar92
>  @smallexample
>  @group
> -                   ;  @r{             30-bit binary values}
> +                   ;  @r{       62-bit binary values}
 
> -(lsh 5 2)          ;   5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
> -     @result{} 20         ;      =  @r{00 0000  0000 0000  0000 0000  0001 
> 0100}
> +(lsh 5 2)          ;   5  =  @r{0000...000101}
> +     @result{} 20         ;      =  @r{0000...010100}
>  @end group
>  @group
>  (ash 5 2)
>       @result{} 20
> -(lsh -5 2)         ;  -5  =  @r{11 1111  1111 1111  1111 1111  1111 1011}
> -     @result{} -20        ;      =  @r{11 1111  1111 1111  1111 1111  1110 
> 1100}
> +(lsh -5 2)         ;  -5  =  @r{1111...111011}
> +     @result{} -20        ;      =  @r{1111...101100}
>  (ash -5 2)
>       @result{} -20
>  @end group
>  @group
> -(lsh 5 -2)         ;   5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
> -     @result{} 1          ;      =  @r{00 0000  0000 0000  0000 0000  0000 
> 0001}
> +(lsh 5 -2)         ;   5  =  @r{0000...000101}
> +     @result{} 1          ;      =  @r{0000...000001}
>  @end group
>  @group
>  (ash 5 -2)
>       @result{} 1
>  @end group
>  @group
> -(lsh -5 -2)        ;  -5  =  @r{11 1111  1111 1111  1111 1111  1111 1011}
> -     @result{} 268435454  ;      =  @r{00 0111  1111 1111  1111 1111  1111 
> 1110}
> +(lsh -5 -2)        ;  -5  =  @r{1111...111011}
> +     @result{} 1152921504606846974
> +                   ;      =  @r{0011...111110}
>  @end group
>  @group
> -(ash -5 -2)        ;  -5  =  @r{11 1111  1111 1111  1111 1111  1111 1011}
> -     @result{} -2         ;      =  @r{11 1111  1111 1111  1111 1111  1111 
> 1110}
> +(ash -5 -2)        ;  -5  =  @r{1111...111011}
> +     @result{} -2         ;      =  @r{1111...111110}
>  @end group
>  @end smallexample
>  @end defun
> @@ -961,23 +961,23 @@
 
>  @smallexample
>  @group
> -                   ; @r{               30-bit binary values}
> +                   ; @r{       62-bit binary values}
 
> -(logand 14 13)     ; 14  =  @r{00 0000  0000 0000  0000 0000  0000 1110}
> -                   ; 13  =  @r{00 0000  0000 0000  0000 0000  0000 1101}
> -     @result{} 12         ; 12  =  @r{00 0000  0000 0000  0000 0000  0000 
> 1100}
> +(logand 14 13)     ; 14  =  @r{0000...001110}
> +                   ; 13  =  @r{0000...001101}
> +     @result{} 12         ; 12  =  @r{0000...001100}
>  @end group
 
>  @group
> -(logand 14 13 4)   ; 14  =  @r{00 0000  0000 0000  0000 0000  0000 1110}
> -                   ; 13  =  @r{00 0000  0000 0000  0000 0000  0000 1101}
> -                   ;  4  =  @r{00 0000  0000 0000  0000 0000  0000 0100}
> -     @result{} 4          ;  4  =  @r{00 0000  0000 0000  0000 0000  0000 
> 0100}
> +(logand 14 13 4)   ; 14  =  @r{0000...001110}
> +                   ; 13  =  @r{0000...001101}
> +                   ;  4  =  @r{0000...000100}
> +     @result{} 4          ;  4  =  @r{0000...000100}
>  @end group
 
>  @group
>  (logand)
> -     @result{} -1         ; -1  =  @r{11 1111  1111 1111  1111 1111  1111 
> 1111}
> +     @result{} -1         ; -1  =  @r{1111...111111}
>  @end group
>  @end smallexample
>  @end defun
> @@ -991,18 +991,18 @@
 
>  @smallexample
>  @group
> -                   ; @r{              30-bit binary values}
> +                   ; @r{       62-bit binary values}
 
> -(logior 12 5)      ; 12  =  @r{00 0000  0000 0000  0000 0000  0000 1100}
> -                   ;  5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
> -     @result{} 13         ; 13  =  @r{00 0000  0000 0000  0000 0000  0000 
> 1101}
> +(logior 12 5)      ; 12  =  @r{0000...001100}
> +                   ;  5  =  @r{0000...000101}
> +     @result{} 13         ; 13  =  @r{0000...001101}
>  @end group
 
>  @group
> -(logior 12 5 7)    ; 12  =  @r{00 0000  0000 0000  0000 0000  0000 1100}
> -                   ;  5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
> -                   ;  7  =  @r{00 0000  0000 0000  0000 0000  0000 0111}
> -     @result{} 15         ; 15  =  @r{00 0000  0000 0000  0000 0000  0000 
> 1111}
> +(logior 12 5 7)    ; 12  =  @r{0000...001100}
> +                   ;  5  =  @r{0000...000101}
> +                   ;  7  =  @r{0000...000111}
> +     @result{} 15         ; 15  =  @r{0000...001111}
>  @end group
>  @end smallexample
>  @end defun
> @@ -1016,18 +1016,18 @@
 
>  @smallexample
>  @group
> -                   ; @r{              30-bit binary values}
> +                   ; @r{       62-bit binary values}
 
> -(logxor 12 5)      ; 12  =  @r{00 0000  0000 0000  0000 0000  0000 1100}
> -                   ;  5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
> -     @result{} 9          ;  9  =  @r{00 0000  0000 0000  0000 0000  0000 
> 1001}
> +(logxor 12 5)      ; 12  =  @r{0000...001100}
> +                   ;  5  =  @r{0000...000101}
> +     @result{} 9          ;  9  =  @r{0000...001001}
>  @end group
 
>  @group
> -(logxor 12 5 7)    ; 12  =  @r{00 0000  0000 0000  0000 0000  0000 1100}
> -                   ;  5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
> -                   ;  7  =  @r{00 0000  0000 0000  0000 0000  0000 0111}
> -     @result{} 14         ; 14  =  @r{00 0000  0000 0000  0000 0000  0000 
> 1110}
> +(logxor 12 5 7)    ; 12  =  @r{0000...001100}
> +                   ;  5  =  @r{0000...000101}
> +                   ;  7  =  @r{0000...000111}
> +     @result{} 14         ; 14  =  @r{0000...001110}
>  @end group
>  @end smallexample
>  @end defun
> @@ -1040,9 +1040,9 @@
>  @example
>  (lognot 5)
>       @result{} -6
> -;;  5  =  @r{00 0000  0000 0000  0000 0000  0000 0101}
> +;;  5  =  @r{0000...000101} (62 bits total)
>  ;; @r{becomes}
> -;; -6  =  @r{11 1111  1111 1111  1111 1111  1111 1010}
> +;; -6  =  @r{1111...111010} (62 bits total)
>  @end example
>  @end defun
 

> === modified file 'doc/lispref/objects.texi'
> --- doc/lispref/objects.texi  2011-05-05 06:31:14 +0000
> +++ doc/lispref/objects.texi  2011-06-03 18:49:33 +0000
> @@ -164,25 +164,25 @@
>  @node Integer Type
>  @subsection Integer Type
 
> -  The range of values for integers in Emacs Lisp is @minus{}536870912 to
> -536870911 (30 bits; i.e.,
> +  The range of values for integers in Emacs Lisp is
> +@minus{}2305843009213693952 to 2305843009213693951 (62 bits; i.e.,
>  @ifnottex
> --2**29
> +-2**61
>  @end ifnottex
>  @tex
> -@math{-2^{29}}
> +@math{-2^{61}}
>  @end tex
>  to
>  @ifnottex
> -2**29 - 1)
> +2**61 - 1)
>  @end ifnottex
>  @tex
> -@math{2^{29}-1})
> +@math{2^{61}-1})
>  @end tex
> -on most machines.  (Some machines may provide a wider range.)  It is
> -important to note that the Emacs Lisp arithmetic functions do not check
> -for overflow.  Thus @code{(1+ 536870911)} is @minus{}536870912 on most
> -machines.
> +on most machines.  Some machines may provide a narrower or wider
> +range; all machines provide at least 30 bits.  Emacs Lisp arithmetic
> +functions do not check for overflow.  Thus @code{(1+
> +2305843009213693951)} is @minus{}2305843009213693952 on most machines.
 
>    The read syntax for integers is a sequence of (base ten) digits with an
>  optional sign at the beginning and an optional period at the end.  The
> @@ -195,7 +195,6 @@
>  1                ; @r{The integer 1.}
>  1.               ; @r{Also the integer 1.}
>  +1               ; @r{Also the integer 1.}
> -1073741825       ; @r{Also the integer 1 on a 30-bit implementation.}
>  @end group
>  @end example
 
> @@ -203,8 +202,8 @@
>  As a special exception, if a sequence of digits specifies an integer
>  too large or too small to be a valid integer object, the Lisp reader
>  reads it as a floating-point number (@pxref{Floating Point Type}).
> -For instance, on most machines @code{536870912} is read as the
> -floating-point number @code{536870912.0}.
> +For instance, on most machines @code{2305843009213693952} is read as the
> +floating-point number @code{2.305843009213694e+18}.
 
>    @xref{Numbers}, for more information.
 

> === modified file 'doc/lispref/os.texi'
> --- doc/lispref/os.texi       2011-02-01 07:23:48 +0000
> +++ doc/lispref/os.texi       2011-06-03 18:49:33 +0000
> @@ -1193,11 +1193,11 @@
>  from the functions @code{current-time} (@pxref{Time of Day}) and
>  @code{file-attributes} (@pxref{Definition of file-attributes}).
 
> -  Many operating systems are limited to time values that contain 32 bits
> +  Many 32-bit operating systems are limited to time values that contain 32 
> bits
>  of information; these systems typically handle only the times from
> -1901-12-13 20:45:52 UTC through 2038-01-19 03:14:07 UTC.  However, some
> -operating systems have larger time values, and can represent times far
> -in the past or future.
> +1901-12-13 20:45:52 UTC through 2038-01-19 03:14:07 UTC.  However, 64-bit
> +and some 32-bit operating systems have larger time values, and can
> +represent times far in the past or future.
 
>    Time conversion functions always use the Gregorian calendar, even
>  for dates before the Gregorian calendar was introduced.  Year numbers

> === modified file 'etc/ChangeLog'
> --- etc/ChangeLog     2011-05-24 14:22:44 +0000
> +++ etc/ChangeLog     2011-06-03 18:42:04 +0000
> @@ -1,3 +1,7 @@
> +2011-06-03  Paul Eggert  <eggert@cs.ucla.edu>
> +
> +     * NEWS: 62-bit integers are typical now.
> +
>  2011-05-24  Leo Liu  <sdl.web@gmail.com>
 
>       * NEWS: Mention the new primitive sha1 and the removal of sha1.el.

> === modified file 'etc/NEWS'
> --- etc/NEWS  2011-06-01 15:34:41 +0000
> +++ etc/NEWS  2011-06-03 18:42:04 +0000
> @@ -902,6 +902,14 @@
>  *** New function `special-variable-p' to check whether a variable is
>  declared as dynamically bound.
 
> +** Emacs integers have a wider range on typical 32-bit hosts.
> +Previously, they were limited to a 30-bit range (-2**29 .. 2**29-1).
> +Now, they are limited to a 62-bit range (-2**61 .. 2**61-1), the
> +same as on 64-bit hosts.  This increased range comes from the Emacs
> +interpreter using 64-bit native integer types that are available
> +on typical modern 32-bit platforms.  Older 32-bit hosts that lack
> +64-bit integers have the same 30-bit range as before.
> +
>  ** pre/post-command-hook are not reset to nil upon error.
>  Instead, the offending function is removed.
 

> === modified file 'src/ChangeLog'
> --- src/ChangeLog     2011-06-03 18:22:12 +0000
> +++ src/ChangeLog     2011-06-03 18:42:59 +0000
> @@ -1,5 +1,14 @@
>  2011-06-03  Paul Eggert  <eggert@cs.ucla.edu>
 
> +     Fix doc for machines with wider system times such as time_t.
> +     On such machines, it's now safe to assume that EMACS_INT is as
> +     wide as the system times, so that shifting right by 16 will
> +     result in an integer that always fits in EMACS_INT.
> +     * dired.c (Ffile_attributes): Document large inode number handling.
> +     * termhooks.h: Fix comment for large time stamp handling.
> +
> +     * lisp.h (WIDE_EMACS_INT): Now defaults to 1.
> +
>       * xselect.c: Use 'unsigned' more consistently.
>       (selection_data_to_lisp_data, lisp_data_to_selection_data):
>       Use 'unsigned' consistently when computing sizes of unsigned objects.

> === modified file 'src/dired.c'
> --- src/dired.c       2011-06-02 06:21:13 +0000
> +++ src/dired.c       2011-06-03 18:42:59 +0000
> @@ -901,10 +901,10 @@
>   8. File modes, as a string of ten letters or dashes as in ls -l.
>   9. t if file's gid would change if file were deleted and recreated.
>  10. inode number.  If inode number is larger than what Emacs integer
> -  can hold, but still fits into a 32-bit number, this is a cons cell
> +  can hold, but all but the bottom 16 bits still fits, this is a cons cell
>    containing two integers: first the high part, then the low 16 bits.
> -  If the inode number is wider than 32 bits, this is of the form
> -  (HIGH MIDDLE . LOW): first the high 24 bits, then middle 24 bits,
> +  If the inode number is still wider, this is of the form
> +  (HIGH MIDDLE . LOW): first the high bits, then the middle 24 bits,
>    and finally the low 16 bits.
>  11. Filesystem device number.  If it is larger than what the Emacs
>    integer can hold, this is a cons cell, similar to the inode number.
> @@ -1008,8 +1008,8 @@
>                       make_number ((EMACS_INT)(s.st_ino & 0xffff)));
>    else
>      {
> -      /* To allow inode numbers beyond 32 bits, separate into 2 24-bit
> -      high parts and a 16-bit bottom part.
> +      /* To allow inode numbers beyond what INTEGER_TO_CONS can handle,
> +      separate into 2 24-bit high parts and a 16-bit bottom part.
>        The code on the next line avoids a compiler warning on
>        systems where st_ino is 32 bit wide. (bug#766).  */
>        EMACS_INT high_ino = s.st_ino >> 31 >> 1;

> === modified file 'src/lisp.h'
> --- src/lisp.h        2011-06-03 18:14:49 +0000
> +++ src/lisp.h        2011-06-03 18:28:20 +0000
> @@ -36,13 +36,14 @@
>  #define CHECK_CONS_LIST() ((void) 0)
>  #endif
 
> -/* Temporarily disable wider-than-pointer integers until they're tested more.
> -   Build with CFLAGS='-DWIDE_EMACS_INT' to try them out.  */
> -/* #undef WIDE_EMACS_INT */
> +/* To disable wider-than-pointer integers, build with -DWIDE_EMACS_INT=0.  */
> +#ifndef WIDE_EMACS_INT
> +#define WIDE_EMACS_INT 1
> +#endif
 
>  /* These are default choices for the types to use.  */
>  #ifndef EMACS_INT
> -# if BITS_PER_LONG < BITS_PER_LONG_LONG && defined WIDE_EMACS_INT
> +# if BITS_PER_LONG < BITS_PER_LONG_LONG && WIDE_EMACS_INT
>  #  define EMACS_INT long long
>  #  define BITS_PER_EMACS_INT BITS_PER_LONG_LONG
>  #  define pI "ll"

> === modified file 'src/termhooks.h'
> --- src/termhooks.h   2011-05-27 16:17:59 +0000
> +++ src/termhooks.h   2011-06-03 18:42:59 +0000
> @@ -342,8 +342,8 @@
>       SELECTION-VALUE is the value that emacs owns for that selection.
>        It may be any kind of Lisp object.
>       SELECTION-TIMESTAMP is the time at which emacs began owning this
> -      selection, as a cons of two 16-bit numbers (making a 32 bit
> -      time.)
> +      selection, as an Emacs integer; or if that doesn't fit, as a
> +      cons of two 16-bit integers (making a 32 bit time.)
>       FRAME is the frame for which we made the selection.  If there is
>        an entry in this alist, then it can be assumed that Emacs owns
>        that selection.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]