Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.os.linux.slackware > #25419
| From | Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> |
|---|---|
| Newsgroups | alt.os.linux.slackware |
| Subject | Re: newbie installation question |
| Date | 2015-08-26 18:18 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <mrkvtk$vma$2@dont-email.me> (permalink) |
| References | <55d2a01e$0$1652$742ec2ed@news.sonic.net> <55d2c258$0$302$14726298@news.sunsite.dk> <55d31ce2$0$1670$742ec2ed@news.sonic.net> <mrh19t$qcg$1@dont-email.me> <55dda82e$0$1649$742ec2ed@news.sonic.net> |
On Wed, 26 Aug 2015 04:51:00 -0700, Michael Blanc wrote:
> Now just out of curiosity, what would be sizeof(int) and sizeof(long)?'
> If this is a 64-bit system, then don't you suppose that at least one of
> those should be eight bytes? Shouldn't the native integer be that size,
> perhaps with an appropriate compiler switch?
Yet another quick test:
-8<-----------------------------------
minotaur:/tmp> cat sizes.c
#include <stdio.h>
int main(int argc, char **argv)
{
printf("A long long is %d bytes\n", sizeof(long long));
printf("A long is %d bytes\n", sizeof(long));
printf("An int is %d bytes\n", sizeof(int));
printf("A short is %d bytes\n", sizeof(short));
printf("A char is %d bytes\n", sizeof(char));
return 0;
}
minotaur:/tmp> gcc -o sizes sizes.c
minotaur:/tmp> file sizes
sizes: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked (uses shared libs), not stripped
minotaur:/tmp> ./sizes
A long long is 8 bytes
A long is 8 bytes
An int is 4 bytes
A short is 2 bytes
A char is 1 bytes
-8<-----------------------------------
I am not aware of any switches which changes this behaviour, but google
is your friend...
regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc351(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost
Back to alt.os.linux.slackware | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
newbie installation question "Michael Blanc" <mblanc@sonic.net> - 2015-08-17 20:01 -0700
Re: newbie installation question Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2015-08-18 05:27 +0000
Re: newbie installation question "Michael Blanc" <mblanc@sonic.net> - 2015-08-18 04:54 -0700
Re: newbie installation question Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2015-08-25 06:17 +0000
Re: newbie installation question Ralph Spitzner <rasp@spitzner.org> - 2015-08-26 09:40 +0200
Re: newbie installation question "Michael Blanc" <mblanc@sonic.net> - 2015-08-26 04:51 -0700
Re: newbie installation question Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2015-08-26 18:18 +0000
Re: Newsserver (was: newbie installation question) Chick Tower <c.tower@deadspam.com> - 2015-08-26 18:03 +0000
Re: Newsserver (was: newbie installation question) Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2015-08-26 18:08 +0000
Re: Newsserver (was: newbie installation question) Chick Tower <c.tower@deadspam.com> - 2015-08-28 02:23 +0000
Re: Newsserver (was: newbie installation question) Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2015-08-28 05:34 +0000
Re: newbie installation question JohnF <john@please.see.sig.for.email.com> - 2015-08-19 02:16 +0000
Re: newbie installation question Rich <rich@example.invalid> - 2015-08-19 10:16 +0000
Re: newbie installation question Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-08-19 10:40 -0400
Re: newbie installation question JohnF <john@please.see.sig.for.email.com> - 2015-08-20 05:35 +0000
csiph-web