Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* Re: pcc directive ?
  1995-11-21  5:00 pcc directive ? Frederic Bouquet
@ 1995-11-21  5:00 ` Dan Pop
  1995-11-22  5:00 ` Jeffrey Mogul
  1 sibling, 0 replies; 3+ messages in thread
From: Dan Pop @ 1995-11-21  5:00 UTC (permalink / raw)


I guess the subject was meant to be "cpp directive".

frederic_bouquet@ascus.com (Frederic Bouquet) writes:

>I have to compile a source code on a DecAlpha machine. In this source code
>there are some machine dependant part (delimited with #ifdef RS6000 ...
>#endif).
>On a DecAlpha is there a predefine command so that I can enter "#ifdef
>decalpha". Is decalpha exists ? if not what is the right name ?

You forgot to mention the operating system.  From your mention of RS6000
it can be assumed that you're interested in OSF/1.  If this is the case,
use:

    #if defined __alpha && defined __osf__

If you're sure your code will be never compiled under other Alpha OS, you
can use the simpler:

    #ifdef __alpha

In general, when you want to find out which symbols are predefined on a Unix
cc, try the -v compiler option, like this:

    cc -v foo.c

Dan
-- 
Dan Pop
CERN, CN Division
Email: danpop@mail.cern.ch 
Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland



^ permalink raw reply	[flat|nested] 3+ messages in thread

* pcc directive ?
@ 1995-11-21  5:00 Frederic Bouquet
  1995-11-21  5:00 ` Dan Pop
  1995-11-22  5:00 ` Jeffrey Mogul
  0 siblings, 2 replies; 3+ messages in thread
From: Frederic Bouquet @ 1995-11-21  5:00 UTC (permalink / raw)


I have to compile a source code on a DecAlpha machine. In this source code
there are some machine dependant part (delimited with #ifdef RS6000 ...
#endif).
On a DecAlpha is there a predefine command so that I can enter "#ifdef
decalpha". Is decalpha exists ? if not what is the right name ?

Many thanks

Fred

+------------------------------------+--------------------------+
| Frederic BOUQUET                   | Phone : (33) 77 93 57 46 |
| Cornut Informatique                | Fax   : (33) 77 92 51 39 |
| 24, rue de la Telematique - BP 702 | AppleLink : CORNUT.INF   |
| 42950 St Etienne cedex 9 FRANCE    | Compuserve: 100303,1061  |
| frederic_bouquet@ascus.com         |                          |
+------------------------------------+--------------------------+



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: pcc directive ?
  1995-11-21  5:00 pcc directive ? Frederic Bouquet
  1995-11-21  5:00 ` Dan Pop
@ 1995-11-22  5:00 ` Jeffrey Mogul
  1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey Mogul @ 1995-11-22  5:00 UTC (permalink / raw)


In article <frederic_bouquet-2111950840030001@ad74-007.compuserve.com> frederic_bouquet@ascus.com (Frederic Bouquet) writes:
>I have to compile a source code on a DecAlpha machine. In this source code
>there are some machine dependant part (delimited with #ifdef RS6000 ...
>#endif).
>On a DecAlpha is there a predefine command so that I can enter "#ifdef
>decalpha". Is decalpha exists ? if not what is the right name ?

On Digital UNIX V3.2, "man cc" includes this handy table:

  The following table shows which macros are defined for each of the -std
  flags.

  ______________________________________________
  Macro                   std0        std   std1
                          (default)
  ______________________________________________
  LANGUAGE_C              yes         no    no
  __LANGUAGE_C__          yes         yes   yes
  unix                    yes         no    no
  __unix__                yes         yes   yes
  __osf__                 yes         yes   yes
  __alpha                 yes         yes   yes
  SYSTYPE_BSD             yes         no    no
  _SYSTYPE_BSD            yes         yes   yes
  LANGUAGE_ASSEMBLY       yes         yes   yes
  __LANGUAGE_ASSEMBLY__   yes         yes   yes
  ______________________________________________

In other words, it depends somewhat on what compilation flags you
provide, but "#ifdef __alpha" should work in all cases.

(The "__LANGUAGE_C__" and "__LANGUAGE_ASSEMBLY__" stuff is only
defined for .c and .s files, respectively.)

-Jeff



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1995-11-22  5:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-21  5:00 pcc directive ? Frederic Bouquet
1995-11-21  5:00 ` Dan Pop
1995-11-22  5:00 ` Jeffrey Mogul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox