LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-20-2011, 06:00 PM   #1
minivy
LQ Newbie
 
Registered: Nov 2011
Posts: 15

Rep: Reputation: Disabled
Where To Find The #define


To Linux fans,

My inherited code has #ifdef for the variables below. I tried to find the #define for them but could not locate the #define.
If you know where the #define for these variables, please help

__KERNEL__
__ASSEMBLY__
_powerpc64__
CONFIG_64BIT

Thanks in advance
 
Old 12-21-2011, 12:42 AM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Bookworm (Fluxbox WM)
Posts: 1,391
Blog Entries: 54

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
These are typically defined on the command line rather than an include file.

__KERNEL__ is defined in the kernel makefile and is used so that the headers can be used both by kernel/kernel modules and by libraries (it affects what is available in certain header files)
__ASSEMBLY__ is also defined in the kernel makefile when compiling assembler code, so that headers can be used by both assembler and C language files
__powerpc64__ possibly defined by the compiler depending on the cpu architecture being selected
CONFIG_64BIT is defined in the configuration file for the kernel

If you are using your code as part of a kernel module with a typical makefile, then these will all be defined (or not defined) as appropriate.
 
1 members found this post helpful.
  


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
[SOLVED] #define in C++ ravishekhar.82 Programming 12 04-06-2010 07:03 AM
Help with a #define Wynd Programming 4 04-22-2007 03:30 PM
m4 define in a define Four Programming 0 03-04-2007 09:41 PM
define jhon Linux - Networking 2 08-30-2004 07:42 PM
using #define Jo_Nak Programming 4 06-11-2003 01:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:36 AM.

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