#ifdef statement inside #define

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Has anyone an idea how to code following macro:

 

#define INIT()    \

    #ifdef THREDSAFE        \

              lock_mutex()   \

    #endif    \

The error ist that after a # operator there is an parameter expected. The normal escape doesn't help in this case.

Shure I can write this in every line I need it but I want to have a macro.

CU

Katharina



Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!   
http://smartsurfer.web.de/?mc=100071&distributionid=000000000071  

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux