Re: Using C macros without massive rewrites

2012-06-12 Thread Andrej Mitrovic
On 6/12/12, Johannes Pfau wrote: > But for simple macros, gcc -E -dM can be useful. > gcc -E -dM '/usr/include/sys/types.h' This could be useful for me, thanks. More options: http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Preprocessor-Options.html

Re: Using C macros without massive rewrites

2012-06-12 Thread Johannes Pfau
Am Tue, 12 Jun 2012 06:15:38 +0200 schrieb Alex Rønne Petersen : > On 12-06-2012 04:20, Charles McAnany wrote: > > Hi, all. I'm studying Kerrisk's The Linux Programming Interface for > > fun. The book is written in C, and I thought it would be fun to do > > the exercises in D. My problem is that I

Re: Using C macros without massive rewrites

2012-06-11 Thread Alex Rønne Petersen
On 12-06-2012 04:20, Charles McAnany wrote: Hi, all. I'm studying Kerrisk's The Linux Programming Interface for fun. The book is written in C, and I thought it would be fun to do the exercises in D. My problem is that I'm doing things like #include in my C code and that loads oodles of macros li

Using C macros without massive rewrites

2012-06-11 Thread Charles McAnany
Hi, all. I'm studying Kerrisk's The Linux Programming Interface for fun. The book is written in C, and I thought it would be fun to do the exercises in D. My problem is that I'm doing things like #include in my C code and that loads oodles of macros like ssize_t, O_RDONLY, EXIT_SUCCESS, etc.