diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2011-10-17 15:22:11 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2011-10-17 15:22:11 +0300 |
commit | 8d784b2fdc3860543e3164829a98087882d5b9cd (patch) | |
tree | b6d5364419dfdfadb570295c14a6f19034e3f03e | |
parent | 3d9612635ad9a74c66bf7b89952b184090da723e (diff) |
портирую под windows
-rw-r--r-- | server/server/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/server/main.cpp b/server/server/main.cpp index 30d6404..baabcd3 100644 --- a/server/server/main.cpp +++ b/server/server/main.cpp @@ -1115,6 +1115,7 @@ int main(int argc, char* argv[]) int opt = 0; int daemon = 0; std::string cfg_path; +#ifndef WIN32 while ((opt = getopt(argc, argv, (char*)"bhc:")) != -1) //getting options from command line { switch (opt) @@ -1133,8 +1134,12 @@ int main(int argc, char* argv[]) default: break; } +#else + cfg_path = "./config"; +#endif } +#ifndef WIN32 if(daemon) //going to background (only for unix-like systems now) { pid_t pid; @@ -1150,6 +1155,7 @@ int main(int argc, char* argv[]) exit(EXIT_SUCCESS); } } +#endif if (!cfg_path.empty()) cfg = new config(cfg_path.c_str()); |