public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Michael H. Warfield" <mhw@alcove.wittsend.com>
To: GMurray@cware.co.uk (Graham Murray)
Cc: gnu-win32@cygnus.com
Subject: Re: long long vs long
Date: Wed, 22 Jul 1998 13:57:00 -0000	[thread overview]
Message-ID: <199807221508.LAA12504@alcove.wittsend.com> (raw)
In-Reply-To: <73B8DC108A44D111B44700805FF5C69D01E51F@cware>

Graham Murray enscribed thusly:
> This is probably a silly question, but rather than having long long for
> 64 bit, why was long not made 64bit? The standard (AFAIK) states that
> short <= int <= long.  So, it should be possible for long to be 64 bit
> rather than 32. This would give a simple progression from 8bit chars to
> 64bit longs.

	Unfortunately the standard also specifies the length of several
types.  Specifically char is 8 bits, short is 16 bits, and long is 32 bits.
The int type is NOT a specific length but is platform dependent, so an int
on earlier (XENIX and MS-DOS) systems use to be 16 bits while on modern
systems it's 32 bits.  Specifically, an int is defined as the "native"
integer number representation.  Of course, all of these types are "signed"
and have "unsigned" equivalences.  And before have the list jumps on me,
yes I know that unsigned and signed char's get into some interesting
ambiguities, particularly with old code that assumed that a char was
unsigned...

	Most code uses "int" where it wants the native number
representation.  That same code uses "short" and "long" where it wants
specific field lengths.  Imagine the havock that will transpire in code
with masks such as "foo = bar & 0xffff0000L" if you were to expand
long to be 64 bits.  The porting nightmare would make a sequel to
"Nightmare on Elm Street".

	Mike
-- 
 Michael H. Warfield    |  (770) 985-6132   |  mhw@WittsEnd.com
  (The Mad Wizard)      |  (770) 925-8248   |  http://www.wittsend.com/mhw/
  NIC whois:  MHW9      |  An optimist believes we live in the best of all
 PGP Key: 0xDF1DD471    |  possible worlds.  A pessimist is sure of it!
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

  parent reply	other threads:[~1998-07-22 13:57 UTC|newest]

Thread overview: 216+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-21  1:55 Graham Murray
1998-07-22  6:17 ` Harry Broomhall
1998-07-22 13:57 ` Nicholas R LeRoy
1998-07-22 13:57 ` Michael H. Warfield [this message]
1998-07-23  6:15   ` Harry Broomhall
1998-07-23 13:02   ` Matthew Donadio
1998-07-23 15:30   ` Timothy Writer
1998-07-24 12:58     ` Matthew Donadio
1998-07-25  0:08     ` Larry Hall
1998-07-25  1:22       ` Timothy Writer
1998-07-24 12:58   ` Benjamin Riefenstahl
1998-07-22 16:50 ` Michael Weiser
1998-07-23  8:33   ` Brian Osman
1998-07-27 14:23     ` Michael Weiser
1998-07-23  8:33   ` Harry Broomhall
1998-07-23 19:01     ` Michael Weiser
1998-07-24  5:20       ` Harry Broomhall
1998-07-25  0:08         ` Mumit Khan
1998-07-26  9:27           ` sjm
     [not found]           ` <9807261625.AA18550.cygnus.gnu-win32@frodo>
1998-07-28  0:57             ` Christopher G. Faylor
1998-07-27 14:23         ` Michael Weiser
1998-07-25  1:22       ` Timothy Writer
1998-07-28  0:57         ` Michael Weiser
1998-07-24  0:25     ` massimo morara
1998-07-22 17:12 ` Andrew Sharp
     [not found] <;>
     [not found] ` <from>
     [not found]   ` <"Michael>
     [not found]     ` <Hirmke">
     [not found]   ` <dialup-62.215.274.4.dial1.stamford>
     [not found]     ` <([62.215.274.4]>
2001-11-25 18:01       ` >>>ADVERTISE TO 11,759,000 PEOPLE FREE! FreeEmailSoftware1
  -- strict thread matches above, loose matches on Subject: below --
2001-05-03  6:27 Problem with Windows .lnk files treated as Symlinks Martin Oberhuber
2001-05-03  7:49 ` Larry Hall (RFK Partners, Inc)
2001-05-03 10:46   ` Christopher Faylor
     [not found] <Jeffrey>
     [not found] ` <C.>
     [not found]   ` <Fried"'s>
     [not found]     ` <message>
     [not found]       ` <of>
     [not found]         ` <"Mon,>
     [not found]         ` <"Thu,>
     [not found]         ` <"Fri,>
     [not found]           ` <11>
     [not found]         ` <"Tue,>
     [not found]         ` <"Wed,>
     [not found]           ` <22>
     [not found]           ` <07>
     [not found]             ` <Jan>
     [not found]               ` <2001>
     [not found]                 ` <16:18:12>
     [not found]               ` <1998>
     [not found]                 ` <11:08:42>
     [not found]                   ` <-0400>
     [not found]                 ` <16:34:34>
     [not found]                   ` <-0500>
     [not found]                     ` <DJ>
     [not found]                     ` <Daniel>
1998-12-11 14:39                     ` help on compiling perl/ nt with cygwin. gnu c lib missing john z
1998-12-12  9:41                       ` Michael Hirmke
1998-12-13  5:55                       ` Peter Moulder
     [not found]                       ` <3.0.5.32.19981213122803.00863b20@pciii>
1998-12-18 20:36                         ` Peter Moulder
1999-02-02  5:27                     ` OpenGL and glut with B20.1 Suhaib M. Siddiqi
1999-02-02  5:44                       ` Levon Saldamli
     [not found]                         ` < 7wsocoudi1.fsf@sandra.lysator.liu.se >
1999-02-02  6:18                           ` Theodore Jump
1999-02-28 23:02                             ` Theodore Jump
1999-02-03  5:02                           ` unsubscribe john z
1999-02-28 23:02                             ` unsubscribe john z
1999-02-28 23:02                         ` OpenGL and glut with B20.1 Levon Saldamli
1999-02-28 23:02                       ` Suhaib M. Siddiqi
2001-01-04 13:09                     ` First Cygwin Installation Hough, Louis F
2001-01-04 13:12                       ` DJ Delorie
2001-01-04 13:21                         ` David M. Karr
2001-01-04 13:39                           ` Larry Hall (RFK Partners, Inc)
2001-01-04 13:55                             ` David M. Karr
2001-01-04 14:14                               ` Larry Hall (RFK Partners, Inc)
2001-01-04 14:41                               ` Earnie Boyd
2001-01-04 14:55                                 ` David M. Karr
2001-01-04 15:10                                   ` Christopher Faylor
2001-01-05 12:52                     ` Drive with cygwin moved from "E:" to "D:", how to fix? David M. Karr
2001-01-05 13:00                       ` DJ Delorie
2001-01-05 13:40                         ` David M. Karr
2001-01-05 13:46                           ` Larry Hall (RFK Partners, Inc)
2001-01-05 14:04                             ` David M. Karr
2001-01-05 13:50                       ` Gerrit P. Haase
2001-01-06 11:30                       ` Quick setup script "taxidermy.pl" Soren Andersen
2001-01-11 14:23                     ` NTEmacs shell/CygWin: should control-C work? Daniel Barclay
2001-01-11 15:00                       ` David M. Karr
2001-01-12 11:48                         ` Daniel Barclay
2001-01-12 11:54                           ` David M. Karr
2001-01-12 12:30                             ` Larry Hall (RFK Partners, Inc)
2001-01-12 12:43                               ` David M. Karr
2001-01-12 13:12                                 ` Daniel Barclay
2001-01-12 13:13                                 ` Larry Hall (RFK Partners, Inc)
2001-01-12 13:06                             ` Daniel Barclay
2001-01-12 13:26                           ` Ehud Karni
2001-01-12 13:57                             ` Larry Hall (RFK Partners, Inc)
2001-01-16 11:14                               ` Daniel Barclay
2001-01-16 11:27                                 ` Larry Hall (RFK Partners, Inc)
2001-01-18  8:21                                   ` Daniel Barclay
2001-01-18  8:27                                     ` Larry Hall (RFK Partners, Inc)
2001-01-18 16:47                                       ` Dr. Volker Zell
     [not found]                 ` <14:02:23>
     [not found]                   ` <+0200>
1998-10-23 12:54                     ` Which of cygwin32's design goals does ascii file conversion fulfil? David Fox
1998-10-24 10:29                       ` Larry Hall
1998-10-26  5:47                         ` Olle Olsson
1998-10-28  0:40                           ` Geoffrey Noer
1998-10-25  1:41                       ` Darren Cook
2000-03-13 15:34                     ` [ANN] PW32 the (alternative) Posix-over-Win32 layer 0.3.0 released Michael Hirmke
2000-03-13 15:52                       ` Chris Faylor
2000-03-14 13:06                         ` Michael Hirmke
     [not found]                 ` <21:45:26>
     [not found]                   ` <-0700>
     [not found]                     ` <(PDT)>
2000-04-26  6:56                       ` problems with less Michael Hirmke
2000-05-09  7:42                         ` John S Cooper
2000-05-09  9:08                           ` Chris Faylor
2000-05-09 10:25                             ` Bob McGowan
     [not found]               ` <1999>
     [not found]                 ` <21:28:12>
     [not found]                   ` <-0600>
     [not found]                     ` <(CST)>
     [not found]                       ` <Pine.SO4.4.05.9902222125010.25431-100000@scooby.simple.dallas.tx.us>
     [not found]                         ` <d9btilixqo.fsf@han.cs.umn.edu>
1999-02-22 22:41                           ` [PB] "no acceptable ld" : cywin32 pb, way to handle win path ? Sebastien Barre
1999-02-23  3:06                             ` Gary V. Vaughan
1999-02-28 23:02                               ` Gary V. Vaughan
1999-02-28 23:02                             ` Sebastien Barre
     [not found]                 ` <19:42:30>
     [not found]                   ` <+0100>
1999-02-23 17:15                     ` strange mount behaviour Sebastien Barre
1999-02-24  0:08                       ` Levon Saldamli
     [not found]                         ` < 7wsobw8gql.fsf@sandra.lysator.liu.se >
1999-02-24  0:59                           ` Sebastien Barre
1999-02-28 23:02                             ` Sebastien Barre
1999-02-28 23:02                         ` Levon Saldamli
1999-03-03 13:25                         ` Michael Hirmke
1999-03-31 19:45                           ` Michael Hirmke
1999-02-28 23:02                       ` Sebastien Barre
2001-01-16  0:08                     ` Cygwin commands crashes after ssh login Christer.H.Jansson
2001-01-16  4:41                       ` Erdely, Michael
2001-01-16  5:32                         ` Corinna Vinschen
2001-01-16  5:49                           ` Erdely, Michael
2001-01-16  6:08                           ` Henry S. Thompson
2001-01-16  7:38                             ` Larry Hall (RFK Partners, Inc)
2001-01-16  7:56                             ` Wei Ku
2001-01-16  8:02                               ` Christopher Faylor
2001-01-17  4:04                               ` Corinna Vinschen
2001-01-16  9:11                           ` Egor Duda
2001-01-16  9:28                             ` Christopher Faylor
2001-01-17  5:20                               ` Egor Duda
2001-01-17  5:29                                 ` Christopher Faylor
2001-01-17  3:57                             ` Corinna Vinschen
2001-01-17  5:20                               ` Egor Duda
2001-03-15 13:33                     ` tcsh Win2000: command line editing does not work Brad Barber
2001-03-15 14:15                       ` Corinna Vinschen
2001-03-22  8:01                         ` Kazuhiro Fujieda
2001-03-22 10:08                           ` Brad Barber
2001-03-22 10:27                             ` Kazuhiro Fujieda
2001-03-22 18:49                           ` Christopher Faylor
     [not found]                       ` <m3elvyr90a.fsf@master.athome>
2001-03-16  6:59                         ` Brad Barber
2001-01-24 13:36 KSH is pdksh Galen Boyer
2001-01-24 14:35 ` Larry Hall (RFK Partners, Inc)
2001-01-24 15:33   ` David Feustel
2001-01-24 15:30 ` Corinna Vinschen
2001-01-24 15:39 ` David M. Karr
2001-01-24 17:25   ` Earnie Boyd
2001-01-24 19:07     ` Mumit Khan
2001-01-25  8:25       ` David M. Karr
2001-01-25  8:34         ` Larry Hall (RFK Partners, Inc)
2001-01-25 12:52           ` Matthew Smith
2001-01-25 13:32             ` Earnie Boyd
2001-01-25 14:31               ` Newlib's non-posix'ness [Re: KSH is pdksh] Mumit Khan
2001-01-25 16:17                 ` Earnie Boyd
2001-01-25 21:23                 ` Christopher Faylor
2001-01-25  7:51   ` KSH is pdksh Galen Boyer
2001-01-25 13:01     ` Galen Boyer
2000-03-13  5:16 [ANN] PW32 the (alternative) Posix-over-Win32 layer 0.3.0 released Paul Sokolovsky
2000-03-13  8:05 ` Chris Faylor
2000-03-13  9:03   ` Dr. Volker Zell
2000-03-13 10:05   ` Re[2]: " Paul Sokolovsky
2000-03-13 15:01   ` Michael Hirmke
2000-03-13 15:05     ` Chris Faylor
1999-01-31 23:52 uudecode? John Cooper
1999-01-31 23:52 ` uudecode? Michael Hirmke
1999-01-31 23:52   ` uudecode? John Cooper
1999-01-31 23:52     ` uudecode? root
1999-01-31 23:52       ` uudecode? John Cooper
1999-01-31 23:52         ` uudecode? Pierre A. Humblet
1999-01-31 23:52       ` uudecode? John Cooper
1999-01-31 23:52         ` uudecode? John Cooper
1999-01-31 23:52     ` uudecode? Glenn Spell
1999-01-31 23:52 ` uudecode? Corinna Vinschen
1998-08-04 16:53 long long vs long dahms
1998-08-01  2:01 Joerg Pommnitz
1998-07-29 16:23 dahms
1998-07-27 18:55 dahms
1998-07-24 12:58 Earnie Boyd
1998-07-24  5:20 Robert.Cross
1998-07-23 11:42 Martin Portmann
1998-07-23 11:42 sjm
1998-07-22 17:12 John Estabrook
1998-07-22 10:06 Earnie Boyd
1998-07-23  0:43 ` $Bill Luebkert
1998-01-07  5:29 Why text=binary mounts (Re: Gnu-win32 (b18), coolview and NTEmacs) Earnie Boyd
1998-01-07 12:35 ` Scott Blachowicz
1998-01-07 14:50 ` Fergus Henderson
1998-01-07 22:33 ` Jeffrey C. Fried
1998-01-08 10:46   ` Scott Blachowicz
1998-01-09 11:09     ` Larry Hall (RFK Partners Inc)
1998-01-12 20:11       ` Scott Blachowicz
1998-01-16  2:56         ` Benjamin Riefenstahl
1998-01-10  6:19     ` Why text=binary mounts (Re: Gnu-win32 (b18), coolview and NTE Michael Hirmke
1998-01-11 15:55       ` Larry Hall
     [not found] <23>
     [not found] ` <Feb>
     [not found]   ` <97>
     [not found]     ` <18:00:22>
     [not found]       ` <PST_2@ccm.hf.intel.com>
1997-03-19 18:13         ` Understanding program startup DG Ellis
     [not found]           ` <19>
     [not found]             ` <Mar>
     [not found]               ` <05,>
     [not found]                 ` <2000>
     [not found]                   ` <at>
     [not found]                     ` <12:47PM>
2000-03-05 10:05                       ` What is a "forward slash" Michael Hirmke
     [not found]                     ` <08:00:42AM>
     [not found]                       ` <-0800>
2000-03-12 16:21                         ` various packages Michael Hirmke
     [not found]                         ` <(PST)>
2000-12-20 16:39                           ` new install of cygwin with pdksh doesn't work Earnie Boyd
2000-12-20 17:36                             ` David M. Karr
2000-12-20 18:18                               ` Chris Abbey
2000-12-21  6:27                           ` Earnie Boyd
2000-12-21  8:33                             ` David M. Karr
2000-12-21 12:17                             ` David M. Karr
2000-12-21 12:48                               ` Larry Hall (RFK Partners, Inc)
2000-12-21 13:06                           ` Earnie Boyd
2001-01-03  9:56                             ` David M. Karr
2001-01-03 14:03                               ` Larry Hall (RFK Partners, Inc)
     [not found]                   ` <14:50:18>
     [not found]                     ` <+0000>
     [not found]                       ` <(CT0)>
2000-12-20 19:38                         ` Earnie Boyd
2000-12-20 22:54                           ` David M. Karr
2000-12-21  6:40                             ` Markus Hoenicka
2000-12-21  8:48                               ` David M. Karr
2000-12-21 10:46                                 ` Larry Hall (RFK Partners, Inc)
2000-12-21 16:10                               ` Jari Aalto+mail.emacs
2000-12-21 16:22                                 ` Corinna Vinschen
2000-12-21 16:32                                   ` Christopher Faylor
2000-12-21 16:31                                 ` Christopher Faylor
2000-12-22  6:29                                 ` Markus Hoenicka
2000-12-23  7:03                                   ` Jari Aalto+mail.linux
     [not found]                       ` <(GMT)>
2001-02-11  8:18                         ` QT chris
2001-02-11 15:48                           ` QT Dr. Volker Zell
2001-02-12  7:02                             ` QT Jonathan Fosburgh
2001-02-12  9:36                               ` QT Dr. Volker Zell
2001-02-14 17:05                                 ` QT - request for bind cygwin patch file Kevin Wright
1997-03-19 23:02         ` Understanding program startup Jim Balter
     [not found]     ` <10:42:13>
1997-03-26 17:32       ` Re[2]: Linking with .LIB files David W Palmer
1997-03-25 12:55         ` David W Palmer
     [not found]           ` <01>
1997-03-26  9:44         ` Nick Ing-Simmons
1997-03-27  0:57         ` Jim Balter
     [not found]     ` <12:12:26>
1997-03-31 12:13       ` Re[2]: " David W Palmer
1997-03-27 15:33         ` Jim Balter
1997-03-27 20:59         ` Re[2]: " David W Palmer
     [not found]           ` <17>
     [not found]     ` <10:05:43>
1997-04-01 10:31       ` DLL to lib*.a? David W Palmer
1997-02-23 10:38         ` Re[2]: globbing feature in 17.1 when not under bash issue (b DG Ellis
1997-03-21 10:46         ` Re[2]: Understanding program startup DG Ellis
1997-03-24 10:32         ` Windows API calls that don't work? (Was RE: Stupid stupi David W Palmer
1997-04-02  7:11         ` DLL to lib*.a? kunglao
     [not found]     ` <13:07:28>
1997-04-08 18:15       ` Re[2]: env command does not work correctly DG Ellis
     [not found]     ` <14:20:27>
1997-07-17 14:20       ` Installing b18 usertools Brett A Carter
     [not found] <Sebastien>
     [not found] <Bob>
     [not found] <Mumit>
     [not found] <Benjamin>
     [not found] <john>
     [not found] <Markus>
     [not found] <Michael>
     [not found] ` <H.>
     [not found] <Larry>
     [not found] <Earnie>
     [not found] <Corinna>
     [not found] <Suhaib>
     [not found] ` <M.>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199807221508.LAA12504@alcove.wittsend.com \
    --to=mhw@alcove.wittsend.com \
    --cc=GMurray@cware.co.uk \
    --cc=gnu-win32@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).