30 lines
589 B
Text
30 lines
589 B
Text
/*
|
|
-----BEGIN QCMOD-----
|
|
name: gethostbyname_r()
|
|
-----END QCMOD-----
|
|
*/
|
|
class qc_ghbnr : public ConfObj
|
|
{
|
|
public:
|
|
qc_ghbnr(Conf *c) : ConfObj(c) { }
|
|
|
|
QString name() const { return "gethostbyname_r()"; }
|
|
QString shortname() const { return "ghbnr"; }
|
|
|
|
bool exec()
|
|
{
|
|
QString str =
|
|
"#include<netdb.h>\n"
|
|
"\n"
|
|
"int main()\n"
|
|
"{\n"
|
|
" gethostbyname_r(\"\", 0, 0, 0, 0, 0);\n"
|
|
" return 0;\n"
|
|
"}\n";
|
|
if (!conf->doCompileAndLink(str, QStringList(), QString(), QString(), NULL))
|
|
return false;
|
|
|
|
conf->addDefine("HAVE_GETHOSTBYNAME_R");
|
|
return true;
|
|
}
|
|
};
|