473,748 Members | 6,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Predefined macro names for machine dependent compilation

Dear all,

I was looking at a simple code on an exercise question. In the code,
there is a conditional inclusion dependent on __GNUC__

#include <algorithm>
#include <iomanip>
#ifndef __GNUC__
#include <ios>
#endif

How can I get system specific macro names, like __GNUC__, for the
system I am working on. I do not need this but I was curious about it,
and googled for it but I have always found things related to
conditional compilation. If I am not mistaken, these are the names of
macros defined, correct me if I am wrong.

I use Debian Etch and gcc 4.1.12. Is there a way to get them directly
from command like, maybe this is off-topic :S

Regards, Umut

Jul 5 '07 #1
2 1845
utab wrote:
I was looking at a simple code on an exercise question. In the code,
there is a conditional inclusion dependent on __GNUC__

#include <algorithm>
#include <iomanip>
#ifndef __GNUC__
#include <ios>
#endif

How can I get system specific macro names, like __GNUC__, for the
system I am working on.
If the preceding sentence were a question, I'd answer it with "RTFM".
Your system and the compiler are supposed to come with a manual. So,
R it.
I do not need this but I was curious about it,
and googled for it but I have always found things related to
conditional compilation. If I am not mistaken, these are the names of
macros defined, correct me if I am wrong.

I use Debian Etch and gcc 4.1.12. Is there a way to get them directly
from command like, maybe this is off-topic :S
What does it mean "to get them directly from command like" (and even if
you meant "line")?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Jul 5 '07 #2
utab <um********@gma il.comwrites:
How can I get system specific macro names, like __GNUC__, for the
system I am working on.
Have a look here:

<http://predef.sourcefo rge.net/>

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Jul 5 '07 #3

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

Similar topics

699
34064
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
2
1839
by: poisondart | last post by:
Is there a predefined entity set for Spanish accents? I know that I could just easily make one, except that I intend to do this for other languages in the future, which may have more accents than Spanish. The closest to what I was expecting was this link: http://www.altheim.com/specs/charents.html ....but the link to the ent file is broken. What is the usual/preferred method that you employ to render special
2
3491
by: Pete | last post by:
In Access 95/97 I used to be able to create pull down menus (File,Edit ...) from a macro. It seems there used to be some wizard for that. However in Access 2000 it seems you have to build your menus by customizing a toolbar. With this method you have to create a separate macro for every single menu and sub menu. The old method would allow me to include several menus (File/ print/ page setup ...) all within one macro. Now it seems I...
6
2717
by: J.G.Harston | last post by:
I've been trying to track down explicit information about this for some time. I know that the ANSI C standard specifies the __* and _* macro namespace as reserved for the compiler implementation, and playing with a handful of compilers I can find what those specific compilers predefine, but is there any information out there on how that reserved namespace should be used? If I am writing some portable code what predefined macros should...
17
7094
by: sounak | last post by:
How could we get a macro name from a macro value such that in a header file #define a 100 #define b 200 now the source file will be such that the user gives 100 then the value is outputted as a the user gives 200 then the value is outputted as b
6
6158
by: Marcus Kwok | last post by:
I am designing a GUI (my question is not about GUIs) and I have named my variables using a regular naming scheme. However, in order to simplify the code using these variables, I have created an array of non-owning pointers to these variables. I am trying to write a macro to generate these variable names for me, but I am not sure if what I want to do is possible. The code below demonstrates what I want to do (except it is generating...
16
6737
by: John | last post by:
Does the length of my C variable names have any affect, performance-wise, on my final executable program? I mean, once compiled, etc., is there any difference between these two: number = 3; n = 3; I know its setting aside storage for the variable itself; does it also use up more storage if the variable name is longer? I realize it would probably take quite a lot of long variable names to make any impact if so, but I was just curious...
6
10718
by: zaheer031 | last post by:
Hi All, I need to define a macro as follows #define VERSION "1.0" #ifdef (VERSION == "1.0") #endif main() { }
13
6018
by: Guillaume Dargaud | last post by:
Hello all, I tried to write a macro to check if a system is big endian or little endian with no success. Don't get me wrong, I have no problem writing a function or a one liner to do that, but I was trying to do it in a _macro_ with no side-effect (no global variable declaration). I suspect this is not possible. Anyone cares to prove me wrong ? -- Guillaume Dargaud
0
8989
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8828
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9537
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.