* SUMMARY: Word Sizes
@ 1997-08-12 14:51 Stefan Eguizabal
0 siblings, 0 replies; only message in thread
From: Stefan Eguizabal @ 1997-08-12 14:51 UTC (permalink / raw)
To: tru64-unix-managers
Thanks to the following people for responding:
Steve VanDevender
Richard Renshaw
Tom Rioux
Listserv Postmaster
alan@nabeth.cxo.dec.com
Petri Kallberg
barnwell@jbsvax.eksystems.com
Roel JT Jonkman
Here is Richard Renshaw's response, which was the most helpful for me...
---
Here's a program I wrote to check sizes and the output from my system. It
looks like definitons are correct:
#include <stdio.h>
void main (void) {
printf("Sizes of types:\n");
printf("signed char: %d\n",sizeof(char));
printf("unsigned char: %d\n",sizeof(unsigned char));
printf("short: %d\n",sizeof(short));
printf("unsigned short: %d\n",sizeof(unsigned short));
printf("int: %d\n",sizeof(int));
printf("unsigned int: %d\n",sizeof(unsigned int));
printf("long: %d\n",sizeof(long));
printf("unsigned long: %d\n",sizeof(unsigned long));
}
Sizes of types:
signed char: 1
unsigned char: 1
short: 2
unsigned short: 2
int: 4
unsigned int: 4
long: 8
unsigned long: 8
----
My original post follows:
Hello. I'm trying to use the following on Digital Unix 4.0b. Hardware
is an AlphaServer 2100.
typedef /*signed*/ char int8_t;
typedef unsigned char u_int8_t;
typedef short int16_t;
typedef unsigned short u_int16_t;
typedef int int32_t;
typedef unsigned int u_int32_t;
typedef long long int64_t;
typedef unsigned long long u_int64_t;
Are int's 32 bit? Long's 64? short? etc.?
__________________________________________________________________
| Stefan Eguizabal |
| http://rossi.arc.miami.edu/~seguizab System Administrator|
| Chief of Systems Ed Arnold Center for|
| dotSHOP Cyber Architects, inc. Confluent Media Studies|
| 1570 Madruga Ave. (College of Engineering)|
| Penthouse One University of Miami|
| Coral Gables, FL, 33146 Coral Gables, FL, 33124|
|__________________________________________________________________|
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-08-12 14:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-08-12 14:51 SUMMARY: Word Sizes Stefan Eguizabal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox