#include #include #ifdef _WIN32 #define USERVAR "USERNAME" #else #include #define USERVAR "USER" #endif #define chararraysize 2048 int main(void) { FILE *outfp = NULL; outfp = fopen("${BRLCAD_BINARY_DIR}/include/conf/USER.tmp", "w"); printf("user name: %s\n", getenv(USERVAR)); fprintf(outfp, "\"%s\"", getenv(USERVAR)); fclose(outfp); return 0; }