linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Griffa <mgriffa@technisys.net>
To: Christopher Quinn <cq@htec.demon.co.uk>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: defining a #define
Date: Thu, 05 Dec 2002 10:22:52 -0300	[thread overview]
Message-ID: <3DEF532C.5020701@technisys.net> (raw)
In-Reply-To: <3DEF43F5.7050907@htec.demon.co.uk>

Just what you did is ok

#ifdef LINUX
#define GREAT_API
#define OS "Linux"
#else
#define UNKNOWN
#endif


Christopher Quinn wrote:
Christopher Quinn wrote:

> if i compile a library with a certain build flag
> there are times when i would like to reflect that flag
> into the header file for the library, so that larger
> compilations involving the library are built the same
> way.
>
> ie. something like
>
> ---library.h---
> #ifdef BUILD_THIS_WAY
> #text "#define BUILD_THIS_WAY"
> #endif
>
> i could not find anything in the gnu cpp docs.
> but does anyone know for sure there *is* a way?
>
> thanks.
> - chris
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


> if i compile a library with a certain build flag
> there are times when i would like to reflect that flag
> into the header file for the library, so that larger
> compilations involving the library are built the same
> way.
>
> ie. something like
>
> ---library.h---
> #ifdef BUILD_THIS_WAY
> #text "#define BUILD_THIS_WAY"
> #endif
>
> i could not find anything in the gnu cpp docs.
> but does anyone know for sure there *is* a way?
>
> thanks.
> - chris
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe 
> linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html




  reply	other threads:[~2002-12-05 13:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200211071046.24987.abulfazl@juniv.edu>
2002-11-07 15:35 ` getch() Progga
2002-11-07 18:04   ` getch() Elias Athanasopoulos
2002-11-07 17:19     ` getch() Glynn Clements
2002-11-07 20:58       ` getch() Elias Athanasopoulos
2002-11-08  9:04     ` getch() Progga
2002-11-08 17:51       ` getch() Glynn Clements
2002-12-05 12:17       ` defining a #define Christopher Quinn
2002-12-05 13:22         ` Miguel Griffa [this message]
2002-12-05 13:36           ` Christopher Quinn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DEF532C.5020701@technisys.net \
    --to=mgriffa@technisys.net \
    --cc=cq@htec.demon.co.uk \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).