Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use #ifdef with an OR condition?

Tags:

c

macros

Sorry for asking very basic question. I would like to set OR condition in #ifdef directive.? How to do that ? I tried

#ifdef LINUX | ANDROID ... .. #endif  

It did not work? What is the proper way?

like image 943
Whoami Avatar asked Mar 13 '12 10:03

Whoami


People also ask

How do we use a semicolon?

Use a semicolon to join two related independent clauses in place of a comma and a coordinating conjunction (and, but, or, nor, for, so, yet). Make sure when you use the semicolon that the connection between the two independent clauses is clear without the coordinating conjunction.

When should a semicolon be used examples?

A semicolon may be used between independent clauses joined by a connector, such as and, but, or, nor, etc., when one or more commas appear in the first clause. Example: When I finish here, and I will soon, I'll be glad to help you; and that is a promise I will keep.

How do you use a semicolon in a sentence?

When a semicolon is used to join two or more ideas (parts) in a sentence, those ideas are then given equal position or rank. Some people write with a word processor; others write with a pen or pencil. Use a semicolon between two independent clauses that are connected by conjunctive adverbs or transitional phrases.

What is a semicolon example?

When to Use a Semicolon. A semicolon (;) is a punctuation mark that has two main functions: Semicolons separate items in a complex list. For example, The Council is comprised of ten members: three from Sydney, Australia; four from Auckland, New Zealand; two from Suva, Fiji; and one from Honiara, Solomon Islands.


1 Answers

Like this

#if defined(LINUX) || defined(ANDROID) 
like image 186
zvrba Avatar answered Dec 09 '22 10:12

zvrba