473,378 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

FAR * in 64-bit machines

I am attempting to port a 32-bit application to a 64-bit Itanium
processor architecture.

One of the problems I am having is FAR * declarations are being
rejected by the compiler as "incompatible size". I am assuming that
FAR * is a 32-bit or so call that is inadequate on a 64-bit machine.

What do I need to declare a FAR pointer on a 64-bit machine to be?
FAR FAR? long FAR? REAL REAL FAR? Somebody throw me a bone here.

Many thanks.

Respectfully,

Brian P.
Nov 14 '05 #1
7 4068
pe*****@hotmail.com (pendell) writes:
I am attempting to port a 32-bit application to a 64-bit Itanium
processor architecture.

One of the problems I am having is FAR * declarations are being
rejected by the compiler as "incompatible size". I am assuming that
FAR * is a 32-bit or so call that is inadequate on a 64-bit machine.

What do I need to declare a FAR pointer on a 64-bit machine to be?
FAR FAR? long FAR? REAL REAL FAR? Somebody throw me a bone here.


FAR is not part of the standard C language. It is some kind of
extension provided by your compiler vendor. You will have to
consult a newsgroup that discusses your vendor's compiler.
--
int main(void){char p[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz.\
\n",*q="kl BIcNBFr.NKEzjwCIxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+=strchr(p,*q++)-p;if(i>=(int)sizeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}
Nov 14 '05 #2
"Ben Pfaff" <bl*@cs.stanford.edu> wrote in message
news:87************@pfaff.stanford.edu...
pe*****@hotmail.com (pendell) writes:
I am attempting to port a 32-bit application to a 64-bit Itanium
processor architecture.

One of the problems I am having is FAR * declarations are being
rejected by the compiler as "incompatible size". I am assuming that
FAR * is a 32-bit or so call that is inadequate on a 64-bit machine.

What do I need to declare a FAR pointer on a 64-bit machine to be?
FAR FAR? long FAR? REAL REAL FAR? Somebody throw me a bone here.


FAR is not part of the standard C language. It is some kind of
extension provided by your compiler vendor. You will have to
consult a newsgroup that discusses your vendor's compiler.


Isn't LP64 a standard specification for 64-bit
pointers and integers? If so, then we can talk
about how a conforming implementation would
deal with 64-bit pointers.
Nov 14 '05 #3
On Sat, 24 Jan 2004 14:40:33 +0000, xarax wrote:
"Ben Pfaff" <bl*@cs.stanford.edu> wrote in message
news:87************@pfaff.stanford.edu...
pe*****@hotmail.com (pendell) writes:
> What do I need to declare a FAR pointer on a 64-bit machine to be?


FAR is not part of the standard C language.


Isn't LP64 a standard specification for 64-bit
pointers and integers? If so, then we can talk
about how a conforming implementation would
deal with 64-bit pointers.


From what I could glean from Google
(http://www.opengroup.org/public/tech/aspen/lp64_wp.htm), LP64 is not a
standard but merely a description of a certain way of implementing a
64-bit system (specifically, long and pointers being 64 bits wide while
int is smaller). As such, it would be on-topic to discuss the consequences
of compiling code for an LP64 system (eg, "That call to memmove would
result in UB if long were 64 bits wide"). However, the OP's question was
not about an LP64 system. It seems to me that the OP was asking about a
system where there are various sizes for pointers (akin to the old DOS
apps), and specifically he was asking about an extension to a particular
compiler which allows one to utilize said feature.

Josh
Nov 14 '05 #4
On Sat, 24 Jan 2004 14:40:33 GMT, "xarax" <xa***@email.com> wrote:

snip
Isn't LP64 a standard specification for 64-bit
pointers and integers? If so, then we can talk
about how a conforming implementation would
deal with 64-bit pointers.


No, it is not.

The string LP64 does not appear anywhere in n869, the last public
draft of the standard, and it is unlikely it was added at the last
minute.
<<Remove the del for email>>
Nov 14 '05 #5
In <Bt*****************@newsread2.news.pas.earthlink. net> "xarax" <xa***@email.com> writes:
"Ben Pfaff" <bl*@cs.stanford.edu> wrote in message
news:87************@pfaff.stanford.edu...
pe*****@hotmail.com (pendell) writes:
> I am attempting to port a 32-bit application to a 64-bit Itanium
> processor architecture.
>
> One of the problems I am having is FAR * declarations are being
> rejected by the compiler as "incompatible size". I am assuming that
> FAR * is a 32-bit or so call that is inadequate on a 64-bit machine.
>
> What do I need to declare a FAR pointer on a 64-bit machine to be?
> FAR FAR? long FAR? REAL REAL FAR? Somebody throw me a bone here.


FAR is not part of the standard C language. It is some kind of
extension provided by your compiler vendor. You will have to
consult a newsgroup that discusses your vendor's compiler.


Isn't LP64 a standard specification for 64-bit
pointers and integers? If so, then we can talk
about how a conforming implementation would
deal with 64-bit pointers.


Nope, LP64 is not a requirement for a conforming implementation any more
than ILP32 is. A 64-bit implementation could very well use the IL32P64
model without having its conformance affected. That's precisely why
C99 has introduced the long long type which is required to have at least
64 bits.

Given Microsoft's past track record, I would be very surprised if the
type long is 64 bits on its Itanium implementation.

Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
Nov 14 '05 #6
Da*****@cern.ch (Dan Pop) wrote in message news:<bv**********@sunnews.cern.ch>...
In <Bt*****************@newsread2.news.pas.earthlink. net> "xarax" <xa***@email.com> writes:
"Ben Pfaff" <bl*@cs.stanford.edu> wrote in message
news:87************@pfaff.stanford.edu...
pe*****@hotmail.com (pendell) writes:

> I am attempting to port a 32-bit application to a 64-bit Itanium
> processor architecture.
>
> One of the problems I am having is FAR * declarations are being
> rejected by the compiler as "incompatible size". I am assuming that
> FAR * is a 32-bit or so call that is inadequate on a 64-bit machine.
>
> What do I need to declare a FAR pointer on a 64-bit machine to be?
> FAR FAR? long FAR? REAL REAL FAR? Somebody throw me a bone here.

FAR is not part of the standard C language. It is some kind of
extension provided by your compiler vendor. You will have to
consult a newsgroup that discusses your vendor's compiler.


Isn't LP64 a standard specification for 64-bit
pointers and integers? If so, then we can talk
about how a conforming implementation would
deal with 64-bit pointers.


Right ... so I need to consult my vendor (HP, in this case). So it's
not a standard part of the C language. Nuts... for some reason I
thought it was.

Thanks anyway.

Respectfully,

Brian P.
Nov 14 '05 #7
>> >> > I am attempting to port a 32-bit application to a 64-bit Itanium
>> > processor architecture.
>> >
>> > One of the problems I am having is FAR * declarations are being
>> > rejected by the compiler as "incompatible size". I am assuming that
>> > FAR * is a 32-bit or so call that is inadequate on a 64-bit machine.
>> >
>> > What do I need to declare a FAR pointer on a 64-bit machine to be?
>> > FAR FAR? long FAR? REAL REAL FAR? Somebody throw me a bone here.
>>
>> FAR is not part of the standard C language. It is some kind of
>> extension provided by your compiler vendor. You will have to
>> consult a newsgroup that discusses your vendor's compiler.


Right ... so I need to consult my vendor (HP, in this case).


far (and "near") was (is) something used in the 16-bit DOS environment,
to do some fancy segment operations.

However, this came pretty obsolete when 32-bit was introduced, and
is only there to provide compatibility. gcc doesnot even recognize these
keywords.
Nov 14 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marc Poinot | last post by:
Did anybody use numarray on a 64 bits platform ? (e.g. SGI/Irix) The package works on our 64 bits platforms... using 32 bits mode, but not using 64 mode. Big crash in _ufunc... Is there a flag to...
1
by: Hugo | last post by:
I have a dual boot machine, runs Win XP pro and Win XP Pro 64, XP boots from C and XP 64 boots from D. They both have VS 2005 Beta 2 installed. I have a webapp developed in Win XP (32) which...
3
by: Odd Bjørn Andersen | last post by:
I was asked to install db2 udb workgroup edition (version 7.2) 64-bits on AIX. But I cannot find that we have a CD with that software. Only Enterprise Edition. Is it correct that you have to...
56
by: Dave Vandervies | last post by:
I just fixed a bug that some of the correctness pedants around here may find useful as ammunition. The problem was that some code would, very occasionally, die with a segmentation violation...
0
by: Hugo | last post by:
I have a dual boot machine, runs Win XP pro and Win XP Pro 64, Win XP boots from C and Win XP 64 boot from D. They both have VS 2005 Beta 2 installed. I have a webapp developed in Win XP (32)...
3
by: some one | last post by:
I have kind of wired problem, I using httpwebrequest to post form data to server , in the GetResponse stage a WebException occurred, after tracing the actual error that occurs on the server, I...
1
by: mel_apiso | last post by:
Hi, we have an AIX 5.3 OS, and we purchased DB2 UDB version 8 Workgroup Edition. We want to install 64 bits version, but the source CD's that we have say: WORKGROUP SERVER EDITION Version...
13
by: Mary Lei | last post by:
Does anyone know the link to obtain the tarball for db2 8.1 for solaris running on AMD 64 bit ? This is the entire db2 installation on a new system that does not have db2. Thanks.
10
by: krunalb | last post by:
Hi, I am trying to shift unsigned long long value by 64 bits and this is what i get #include <stdio.h> int main() { unsigned short shiftby= 64;
1
by: =?Utf-8?B?UGF1bCBQaGlsbGlwcw==?= | last post by:
I have read many things about this but I haven't got a clear vision on what to do if anything about this. I have a system that tries to find holes in my web site. One of the things it has...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.