From: curt Date: Thu, 22 Mar 2001 04:19:12 +0000 (+0000) Subject: Initial revision. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8aed19714a82199230603638d4f277b694f27776;p=flightgear.git Initial revision. --- diff --git a/tests/test-gethostname.cxx b/tests/test-gethostname.cxx new file mode 100644 index 000000000..ec62acecd --- /dev/null +++ b/tests/test-gethostname.cxx @@ -0,0 +1,18 @@ +#ifdef HAVE_CONFIG_H +# include +#endif + +#if defined( unix ) || defined( __CYGWIN__ ) +# include // for gethostname() +#endif + +#include + +int main() { +#if defined( unix ) || defined( __CYGWIN__ ) + char name[256]; + gethostname( name, 256 ); + printf("hostname = %s\n", name); +#endif + return 0; +}