This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello, This is something I did sometime ago, and wanted to discuss with you before proposing a change more formally. Here goes: On Interix, the sbrk() function exists, but is not sufficiently implemented to be used in GDB. Because it exists, AC_CHECK_FUNCS (sbrk) finds it, and therefore configure adds the associated "#define HAVE_SBRK" in config.h. If you look at xm-interix.h in the files I recently submitted, you will see that there is a "#undef HAVE_SBRK" to counter the result of AC_CHECK_FUNCS. I would like to get rid of this #undef. To do that, the only way I found is to either: 1. let configure test for sbrk() on Interix, but then override the test result afterward by undefining (in the configure sense) HAVE_SBRK. Something like: AC_CHECK_FUNCS (....) # this line is unchanged case "${host}" in *-*-interix* ) undefine (HAVE_BRK) ;; * ) ;; esac 2. do not do the AC_CHECK_FUNCS test for sbrk() on Interix. This way, HAVE_SBRK will never be defined, and we don't need the undef in xm-interix.h anymore. I did not find a way in the documentation to undefine a variable that was previously defined. So I could not implement 1. I also thought that a user might find it confusing to see the output of configure show Checking for sbrk... yes and then no see HAVE_SBRK defined in config.h... So I implemented 2. A patch is attached (it is only the configure.in part, the rest will follow if the approach to the problem is approved). I also did the same for the poll() function, which should not be used on Interix as well. Is it the best approach to the problem? Would such a patch be accepted for inclusion? Thanks, -- Joel
Attachment:
configure.in.diff2
Description: configure.in.diff
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |