Sponsored Content
Operating Systems AIX porting an application on 64-bit AIX version 5 Post 302139341 by fpmurphy on Friday 5th of October 2007 12:20:01 PM
Old 10-05-2007
You can always check what compilation environment is available to you by means of the sysconf() function.

_SC_XBS5_ILP32_OFF32 Implementation provides a C-language compilation environment
with 32-bit int, long, pointer and off_t types.
_SC_XBS5_ILP32_OFFBIG Implementation provides a C-language compilation environment
with 32-bit int, long and pointer types and an off_t type
using at least 64 bits.
_SC_XBS5_LP64_OFF64 Implementation provides a C-language compilation environment
with 32-bit int and 64-bit long, pointer and off_t types.
_SC_XBS5_LPBIG_OFFBIG Implementation provides a C-language compilation environment
with an int type using at least 32 bits and long, pointer
and off_t types using at least 64 bits.

Man sysconf for further information.
 

9 More Discussions You Might Find Interesting

1. Programming

Porting Win32 application into Linux

I need port Win32 console application, which was developed with MS Visual Studio 6.0 (without MFC using) into Linux. What is the best way to port project? Are there any standard tools or decisions? Thank you in advance, Sergey (0 Replies)
Discussion started by: Sergeyy
0 Replies

2. Gentoo

compiling 32 bit application on 64 bit linux(x86_64)

hi all, i have a 64 bit linux machine. $uname -a Linux SVRDELLD30 2.6.9-42.ELsmp #1 SMP Tue Aug 15 10:35:26 BST 2006 x86_64 x86_64 x86_64 GNU/Linux here by default gcc creates 64 bit executable. but for some reason i want to create 32bit executable. first i want to create 32 bit object... (3 Replies)
Discussion started by: uttamhoode
3 Replies

3. Solaris

Porting C++ 32-bit code on 64-bit Solaris

Hi, I am trying to convert 32-bit code to 64-bit. I have defined function int main() { int* l; size_t len1; fun(len1); return 0; } void fun(int* ptr) { cout<<"\nsizeof(ptr)"<<sizeof(ptr); } However while compiling getting error as : Error: Formal argument ptr... (2 Replies)
Discussion started by: amit_27
2 Replies

4. Linux

Is it possible to compile 64 bit application on 32 bit machine

Hi, I am using 32 bit machine, and I want to compile 64 bit application on 32-bit machine. So please tell me is it possible or not? Regards Mandar (7 Replies)
Discussion started by: Mandar123
7 Replies

5. Red Hat

No Error for 64-bit porting

I am just trying to get the warning while compiling for 64-bit on Linux >> uname -a Linux mms4.es.cpth.ie 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:00:54 EDT 2005 x86_64 x86_64 x86_64 GNU/Linux =================================== Written test.c file which conatin : #include<stdio.h>... (1 Reply)
Discussion started by: amit_27
1 Replies

6. SuSE

64 bit Porting Problem !!!

Dear All, I am trying to build my code (currently functioning on 32bit) on 64 bit SUSE machine. I am getting following error: warning: initializer element is not computable at load time dau.gss.c:275: error: initializer element is not constant dau.gss.c:275: error: (near initialization for... (10 Replies)
Discussion started by: skaushal.schip
10 Replies

7. Red Hat

Unable to install 32 bit application on 64 bit OS

Hi, I am new to Linux OS. My question is that "is it possible to install 32 Bit application on 64 Bit OS?" I have the following Redhat OS on VMware workstation. OS - Red Hat Enterprise Linux Server release 6.2 | 2.6.32-220.el6.x86_64 While installing the application I am getting the... (2 Replies)
Discussion started by: poga
2 Replies

8. Solaris

Porting graphical Solaris application to Linux

I don't expect any quick answers, but if people have links to resources I can investigate I'd be extremely appreciative. Here is what we have today: The "application" is a multi-process train control system that uses the Unix desktop, currently CDE, several motif-based applications and sound,... (8 Replies)
Discussion started by: paz9
8 Replies

9. 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
confstr(3)						     Library Functions Manual							confstr(3)

NAME
confstr - Determines the current value of a specified system variable defined by a string value LIBRARY
Standard C Library (libc) SYNOPSIS
#include <unistd.h> size_t confstr( int name, char *buf, size_t len); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: confstr(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Specifies the system variable setting to be returned. Valid values for the name parameter are defined in the unistd.h header file: Copies a value for the PATH environment variable that finds all standard utilities into the buffer. [Tru64 UNIX] Copies the official name of the installed operating system product into the buffer. [Tru64 UNIX] Copies the official system banner into the buffer. The banner typically consists of the vendor name followed by the product name. [Tru64 UNIX] Copies the product version information into the buffer. [Tru64 UNIX] Copies the official abbreviated company name of the operating system manufacturer into the buffer. If the abbreviated name was not specified, copies the full company name (same as _CS_VENDOR_NAME). [Tru64 UNIX] Copies the official company name of the operating system manufacturer into the buffer. Specifies values to be passed to utilities used in building an application. The name of the parameter establishes type-size constraints for the environment in which an application is being built: The int, long, pointer, and off_t types are treated as 32-bit types. The int, long, and pointer types are treated as 32-bit types, and the off_t type is treated as a type with at least 64 bits. The int type is treated as a 32-bit type, and the long, pointer, and off_t types are treated as 64-bit types. The int type is treated as a type with at least 32 bits, and the long, pointer, and off_t types are treated as types with at least 64 bits. The parameter suffix (id) identifies the component affected by the type-size constraint: The value of the parameter is the set of initial options (compilation options) to be given to cc or c89. The value of the parameter is the set of final options (loader options) to be given to cc or c89. The value of the parameter is the set of libraries to be given to cc or c89. The value of the parameter is the set of checking options to be given to lint. In all cases, if sysconf (_SC_XBS5_ILP32_OFFBIG) returns -1, the meaning of the passed values is unspecified. Points to the buffer into which the confstr function copies the name value. Specifies the size of the buffer storing the name value. DESCRIPTION
The confstr() function allows an application to determine the current setting of certain system parameters, limits, or options that are defined by a string value. The function is mainly used by applications to find the system default value for the PATH environment variable. If the following conditions are true, then the confstr() function copies that value into a len-byte buffer pointed to by the buf parameter: The len parameter is not 0 (zero) The name parameter has a system-defined value The buf parameter is not a null pointer If the string to be returned is longer than len bytes, including the terminating null, then the confstr() function truncates the string to len-1 bytes and adds a terminating null to the result. The application can detect that the string was truncated by comparing the value returned by confstr() with the value of len. If the value of the len parameter is set to 0 (zero) or the buf value is NULL, the confstr() function returns the size of the buffer needed to hold the entire system-defined value, but does not copy the string value. EXAMPLES
To find out how big a buffer is needed to store the _CS_PATH string value, enter: confstr(_CS_PATH, NULL, (size_t) 0) The confstr() function returns the size of the buffer necessary. RETURN VALUES
If the value specified by the name parameter is system-defined, the confstr() function returns the size of the buffer needed to hold the entire value. If this return value is greater than the specified len value, the string returned as the buf value is truncated. If the specified name value is invalid, a value of 0 (zero) is returned, and the errno global variable is set to indicate the error. If the specified name value does not have a system-defined value, the confstr() function returns a value of 0 (zero) and leaves errno unchanged. ERRORS
The confstr() function sets errno as follows: The value of the name parameter is invalid. FILES
Contains system-defined limits. Contains system-defined environment variables. RELATED INFORMATION
Functions: pathconf(2), sysconf(3) Standards: standards(5) delim off confstr(3)
All times are GMT -4. The time now is 01:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy