LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2007, 03:56 AM   #1
son_t
Member
 
Registered: Sep 2006
Posts: 49

Rep: Reputation: 15
MAC OS X defines


Hello

I'm trying to code on Mac OS X in C. Can anyone tell me where MAC_OS_X or equivalent (platform) defines are found (i.e. in which header files)?

I am using lseek64 and and open64 and they don't exist..

Thanks
 
Old 07-24-2007, 04:12 AM   #2
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
You do not need to include a header just use the preprocessor to check the defines
http://predef.sourceforge.net/preos.html#sec17
 
Old 07-24-2007, 04:20 AM   #3
son_t
Member
 
Registered: Sep 2006
Posts: 49

Original Poster
Rep: Reputation: 15
Thanks dmail. Works like a treat

#ifdef __APPLE__ & __MACH__
#define lseek64 lseek
#define open64 open
#endif
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
typedef defines which type? kpachopoulos Programming 1 11-10-2005 02:46 AM
override defines alaios Programming 1 09-14-2005 10:40 AM
OS Conditional Defines kevin.cowley Programming 1 09-24-2003 03:54 PM
What kind of Video Card Defines me as a Person? PrimaryDataLoop Linux - Hardware 5 07-09-2003 02:24 PM
File that defines root command prompt? WeNdeL Linux - Newbie 6 11-20-2002 12:28 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration