distinguishing between 32 bit and 64 bit OS's


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users distinguishing between 32 bit and 64 bit OS's
# 1  
Old 06-12-2006
distinguishing between 32 bit and 64 bit OS's

I have a C application which is to be supported on AIX, Solaris and HPUX.
There are chunks of code which need to #ifdef'd for 64 bit OS's only, i.e., I need these code to be executed only for 64 bit OS's on all the three platforms.
Can someone guide me how to do this. I tried using #ifdef _LP64 but it doesn't seem to work.

thanks,
hirandhir
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Which version of Windows Vista to install with a product key? 32-bit or 64-bit?

Hello everyone. I bought a dell laptop (XPS M1330) online which came without a hard drive. There is a Windows Vista Ultimate OEMAct sticker with product key at the bottom case. I checked dell website (here) for this model and it says this model supports both 32 and 64-bit version of Windows... (4 Replies)
Discussion started by: milhan
4 Replies

2. Shell Programming and Scripting

How to handle 64 bit arithmetic operation at 32 bit compiled perl interpreter?H

Hi, Here is the issue. From the program snippet I have Base: 0x1800000000, Size: 0x3FFE7FFFFFFFF which are of 40 and 56 bits. SO I used use bignum to do the math but summing them up I always failed having correct result. perl interpreter info, perl, v5.8.8 built for... (0 Replies)
Discussion started by: rrd1986
0 Replies

3. UNIX for Advanced & Expert Users

migrating unix mp-ras 32 bit to linux suse 64 bit

Hi. I need to migrate the whole unix environment from a Unix mp-ras 32 bit to a Linux Suse 64 bit. 1) can i use cpio to copy the data? 2) can i just copy the users from unix to linux or do i have to create them by hand 3) are there any other concerns i should worry about? thanx (1 Reply)
Discussion started by: mrodrig
1 Replies

4. Red Hat

boot the 32 bit kernel on a 64 bit PPC Linux machine?

Hi all, I'm looking to cover a corner case for an upcoming test cycle. Is there a way to boot a RedHat Advanced Server 4 (update 3) installed on a Power PC machine to use a 32 bit kernel? This would be similar to what is done here -> https://www.unix.com/aix/26204-aix-platform.html I've done... (0 Replies)
Discussion started by: philrau
0 Replies

5. Programming

copying or concatinating string from 1st bit, leaving 0th bit

Hello, If i have 2 strings str1 and str2, i would like to copy/concatenate str2 to str1, from 1st bit leaving the 0th bit. How do i do it? (2 Replies)
Discussion started by: jazz
2 Replies
Login or Register to Ask a Question
ddi_dma_cookie(9S)					    Data Structures for Drivers 					ddi_dma_cookie(9S)

NAME
ddi_dma_cookie - DMA address cookie SYNOPSIS
#include <sys/sunddi.h> INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). DESCRIPTION
The ddi_dma_cookie_t structure contains DMA address information required to program a DMA engine. The structure is filled in by a call to ddi_dma_getwin(9F), ddi_dma_addr_bind_handle(9F), or ddi_dma_buf_bind_handle(9F), to get device-specific DMA transfer information for a DMA request or a DMA window. STRUCTURE MEMBERS
typedef struct { union { uint64_t _dmac_ll; /* 64 bit DMA address */ uint32_t _dmac_la[2]; /* 2 x 32 bit address */ } _dmu; size_t dmac_size; /* DMA cookie size */ uint_t dmac_type; /* bus specific type bits */ } ddi_dma_cookie_t; You can access the DMA address through the #defines: dmac_address for 32-bit addresses and dmac_laddress for 64-bit addresses. These macros are defined as follows: #define dmac_laddress _dmu._dmac_ll #ifdef _LONG_LONG_HTOL #define dmac_notused _dmu._dmac_la[0] #define dmac_address _dmu._dmac_la[1] #else #define dmac_address _dmu._dmac_la[0] #define dmac_notused _dmu._dmac_la[1] #endif dmac_laddress specifies a 64-bit I/O address appropriate for programming the device's DMA engine. If a device has a 64-bit DMA address reg- ister a driver should use this field to program the DMA engine. dmac_address specifies a 32-bit I/O address. It should be used for devices that have a 32-bit DMA address register. The I/O address range that the device can address and other DMA attributes have to be specified in a ddi_dma_attr(9S) structure. dmac_size describes the length of the transfer in bytes. dmac_type contains bus-specific type bits, if appropriate. For example, a device on a PCI bus has PCI address modifier bits placed here. SEE ALSO
pci(4), sbus(4), sysbus(4), ddi_dma_addr_bind_handle(9F), ddi_dma_buf_bind_handle(9F), ddi_dma_getwin(9F), ddi_dma_nextcookie(9F), ddi_dma_attr(9S) Writing Device Drivers SunOS 5.10 30 Sep 1996 ddi_dma_cookie(9S)