tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Stefan Eguizabal <seguizab () titan ! ccms ! miami ! edu>
To: tru64-unix-managers
Subject: SUMMARY: Word Sizes
Date: Tue, 12 Aug 1997 14:51:34 +0000	[thread overview]
Message-ID: <96078615810357.tru64-unix-managers.marc@archive.invalid> (raw)

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|
     |__________________________________________________________________|

                 reply	other threads:[~1997-08-12 14:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox