2

I have a following C function,

PRIVATE int func_name()
{
   return 0;
}

What does "PRIVATE" mean here?

  • 5
    Where did you found the code? – MikeCAT Feb 26 '16 at 05:08
  • 1
    It means whatever it was `#define`d to mean ... probably `static`. – Jim Balter Feb 26 '16 at 06:09
  • 1
    Voting to close this as "cannot get reproduced". Please add more details and show the definition of `PRIVATE`. As it currently stands, nobody can answer the question, they can just do guessing. (One of many reasons why it is royally stupid to re-define the C language into your own secret macro language.) – Lundin Feb 26 '16 at 07:18

2 Answers2

8

In "normal" C PRIVATE has no meaning.

It is probably a #define to static (or perhaps nothing). I'd suggest trying to grab the output of the pre-processor to see what it looks like. In gcc it's -E to stop after the pre-processor stage.

John3136
  • 28,809
  • 4
  • 51
  • 69
0

Yes someone might have #defined PRIVATE as static. search for #define of private in your code. They should have defined something like this #define PRIVATE static

Meraj Hussain
  • 329
  • 1
  • 6
  • 24