Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > Re: lseek fails...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 3705 of 3882
Post > Topic >>

Re: lseek fails from dylib, but not app

by Robert Spykerman <robert.spykerman@[EMAIL PROTECTED] > Apr 29, 2008 at 07:10 PM

On Apr 16, 7:20 am, eric <es...@[EMAIL PROTECTED]
> wrote:

> It appears the problem was related to variable types.  I know lseek()
> on Mac OSX is uses an off_t variable type, but my code which came over
> from Windows uses int types.  I was just thrown off because the code
> using "int" worked in one project, just not another, but must have
> been differences in project settings or possibly Objective-C vs C.
>
> Anyway, I'll have to make a wrapper for lseek, since I need the same
> code to compile for Windows and Mac.

Yeah, I ran into the same problem. I was doing a linux -> os x ****t
and I discovered that off_t is 64 bits in BSD. Unsigned if I believe.
Took me a while to figure that out as I was calling lseek in assembly
and only passing it a 32 bit value. That was fun....

Not sure if you can add a conditional compilation option in the source
to fix most of your code, that possibly may be easier than a wrapper.
I did that, but I did not have very many calls to lseek to fix.

Robert Spykerman
 




 3 Posts in Topic:
lseek fails from dylib, but not app
eric <eselk@[EMAIL PRO  2008-04-15 13:17:08 
Re: lseek fails from dylib, but not app
eric <eselk@[EMAIL PRO  2008-04-15 14:20:29 
Re: lseek fails from dylib, but not app
Robert Spykerman <robe  2008-04-29 19:10:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:28:45 CST 2008.