#include #ifdef _WIN32 #include #else #include #endif #define chararraysize 2048 int main(void) { char hostname[chararraysize]; FILE *outfp = NULL; #ifdef _WIN32 LPHOSTENT lpHostEntry; WORD wVersionRequested; WSADATA wsaData; wVersionRequested = MAKEWORD(1, 1); WSAStartup(wVersionRequested, &wsaData); #endif hostname[chararraysize - 1] = '\0'; gethostname(hostname, chararraysize - 1); outfp = fopen("${BRLCAD_BINARY_DIR}/include/conf/HOST.tmp", "w"); fprintf(outfp, "\"%s\"", hostname); fclose(outfp); return 0; }