From 1f9cb27bbd255bd841ca2d1e0bb2c165c5fc9931 Mon Sep 17 00:00:00 2001 From: Jenster Date: Fri, 20 Nov 2015 20:40:00 -0800 Subject: [PATCH] other_osx_patch --- retroshare-nogui/src/retroshare.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/retroshare-nogui/src/retroshare.cc b/retroshare-nogui/src/retroshare.cc index 1da48dc6b..59a1bf1b4 100644 --- a/retroshare-nogui/src/retroshare.cc +++ b/retroshare-nogui/src/retroshare.cc @@ -86,8 +86,11 @@ int main(int argc, char **argv) // unfinished //args >> parameter("http-listen", listenAddress, "ipv6 address", "Listen only on the specified address.", false); args >> option("http-allow-all", allowAllIps, "allow connections from all IP adresses (default= localhost only)"); +#ifdef __APPLE__ + args >> help('h',"help","Display this Help"); +#else args >> help(); - +#endif if (args.helpRequested()) { std::cerr << args.usage() << std::endl; @@ -99,7 +102,7 @@ int main(int argc, char **argv) resource_api::ApiServer api; resource_api::RsControlModule ctrl_mod(argc, argv, api.getStateTokenServer(), &api, true); - api.addResourceHandler("control", dynamic_cast(&ctrl_mod), &resource_api::RsControlModule::handleRequest); + api.addResourceHandler("control", dynamic_cast(&ctrl_mod), &resource_api::RsControlModule::handleRequest); resource_api::ApiServerMHD* httpd = 0; if(httpPort != 0) @@ -192,8 +195,11 @@ int main(int argc, char **argv) >> parameter('P',"ssh-p-hash" ,sshPwdHash ,"hash" ,"Ssh login password hash (Generated by retroshare-nogui -G)",false) >> parameter('K',"ssh-key-file" ,sshRsaFile ,"RSA key file", "RSA key file for SSH login (not yet implemented).",false )// NOT FINISHED YET. +#ifdef __APPLE__ + >> help('h',"help","Display this Help"); +#else >> help() ; - +#endif // Normally argstream would handle this by itself, if we called // as.defaultErrorHandling() ; //