[Python-Dev] Good way of finding out what C functions we have?

Brett C. bac at OCF.Berkeley.EDU
Sun Sep 28 22:40:38 EDT 2003


I just did a bunch of research into trying to find out if using strdup() 
in a patch was reasonable.  I finally grepped enough to find strdup in 
pyconfig.h and configure.in .  But that leads to a Brett Newbie Question.

Does there happen to be a better way to find out what functions we check 
for beyond grepping configure.in?  The entire reason I bothered to do so 
much research is I thought we were only supposed to assume ANSI C with 
POSIX (which, from what I can tell, strdup() is not).  But with more 
Googling and grepping I discovered the meaning of AC_REPLACE_FUNCS() 
which strdup was being called in configure.in .  I would never have 
known strdup was available to me for code had I not randomly come across 
this patch and done all of this research.

Because of this I would like to list in the Python development guide I 
am writing up all of the places one can check for info; what 
configure.in checks for or handles and pyport.h come to mind.  It would 
be nice to have a place that lists all the places one can check for C 
functionality that are not in the Python/C API directly.  If people have 
other places in the code that one should check please let me know so I 
can make sure it makes it into the doc and prevents me from having to 
come up with another Brett Newbie Question.  =)

-Brett




More information about the Python-Dev mailing list