This repository has been archived on 2025-12-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
yachat/qcm/ghbnr.qcm
2025-12-25 01:38:25 +05:00

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;
}
};