From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Hoehne To: Michael Snyder Cc: gdb-patches@cygnus.com Subject: Re: Two patches for the readline lib Date: Thu, 01 Apr 1999 00:00:00 -0000 Message-id: <199903152204.OAA23135@cygnus.com> References: <36ED63EB.54B1@cygnus.com> X-SW-Source: 1999-q1/msg00104.html > In that case, would it be appropriate to use a single macro > (eg. if defined (__DJGPP__)) to control these changes? The old > readline was a hodge-podge of different ifdefs of this sort. > It'd be nice to keep it under control this time. At first: I did the patches this way, since there was already one or two #ifdef __MSDOS__, so I thought this is the way like it should be. But in general I agree with you, that this is not the best way. I would do it better if I know where to start. >From other packages I know a way, where you can specify in a host/target specifc file some conditionals which are then either included in the source files or including them in the Makefile so the flags will passed on commandline when compiling. I would for instance introduce a define like #define USE_STDIO_IO to indicate that stdio functions should be used instead of terminal functions. But I don't know where to specify this host depended (in my case for DJGPP). If you can give me some guidelines I will be glad. Robert ****************************************************** * email: Robert Hoehne * * Post: Am Berg 3, D-09573 Dittmannsdorf, Germany * * WWW: http://www.tu-chemnitz.de/~sho/rho * ****************************************************** From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Hoehne To: Michael Snyder Cc: gdb-patches@cygnus.com Subject: Re: Two patches for the readline lib Date: Mon, 15 Mar 1999 14:04:00 -0000 Message-ID: <199903152204.OAA23135@cygnus.com> References: <36ED63EB.54B1@cygnus.com> X-SW-Source: 1999-03/msg00050.html Message-ID: <19990315140400.ES8pA0nNv38q7Cs3miBMK4u8dXo88QbK_Y3ELO6WVKY@z> > In that case, would it be appropriate to use a single macro > (eg. if defined (__DJGPP__)) to control these changes? The old > readline was a hodge-podge of different ifdefs of this sort. > It'd be nice to keep it under control this time. At first: I did the patches this way, since there was already one or two #ifdef __MSDOS__, so I thought this is the way like it should be. But in general I agree with you, that this is not the best way. I would do it better if I know where to start. >From other packages I know a way, where you can specify in a host/target specifc file some conditionals which are then either included in the source files or including them in the Makefile so the flags will passed on commandline when compiling. I would for instance introduce a define like #define USE_STDIO_IO to indicate that stdio functions should be used instead of terminal functions. But I don't know where to specify this host depended (in my case for DJGPP). If you can give me some guidelines I will be glad. Robert ****************************************************** * email: Robert Hoehne * * Post: Am Berg 3, D-09573 Dittmannsdorf, Germany * * WWW: http://www.tu-chemnitz.de/~sho/rho * ******************************************************