0

What does "define" in C code without a # in front of it mean? For example, what's the difference between these two lines:

define retadd "\x9f\x45\x3a\x77"
#define port 110

I found this in code found here: https://www.exploit-db.com/raw/643/

Evan
  • 139
  • 3

2 Answers2

1

It’s not standard C: that’s for sure.

It might be something very compiler specific or a bug in the source code.

Bathsheba
  • 231,907
  • 34
  • 361
  • 483
  • Just to expand on what you said: I wondered, "Perhaps you could define a preprocessor macro without `#`, and this is what happened above?" but the answer to that is no: https://stackoverflow.com/a/8289287/1462295 – BurnsBA Nov 03 '17 at 18:38
0

define without a leading # is just another identifier, and in that context would be a syntax error (it's not a declaration specifier or type name, which is what the compiler expects at that point). That code must be a typo.

John Bode
  • 119,563
  • 19
  • 122
  • 198