I am using the listings package, which is mostly formatting things nicely. However, it fails to syntax highlight indented preprocessor commands correctly.
For example,
\documentclass{article}
\usepackage{listings}
\begin{document}
\lstset{language=C}
\begin{lstlisting}
#if SYSTEM == SYSV
# define HDR "sysv.h"
#if SYSTEM == SYSV
#define HDR "sysv.h"
\end{lstlisting}
\end{document}
The first #define keyword is highlighted properly, but the second #define keyword is not highlighted at all. For old compilers, the # symbol had to the be first character of preprocessor commands, but modern style prefers the latter system for indentation. So, I would prefer to indent the # symbol.

Are there any ways I can indent this symbol and have the syntax highlighting come out correctly in the listings package?

#definedoes not seem to be highlighted. – Peter Grill May 16 '12 at 20:08