@@ -90,8 +90,8 @@ BOOL WINAPI ctrl_c_handler(
9090 return TRUE;
9191}
9292
93- int main (int argc , char * * argv ) {
94-
93+ int wmain (int argc , wchar_t * * argv ) {
94+
9595 w32posix_initialize ();
9696 load_config ();
9797 if (!StartServiceCtrlDispatcherW (dispatch_table )) {
@@ -108,7 +108,7 @@ int main(int argc, char **argv) {
108108 if (argc == 2 ) {
109109 /*agent process is likely a spawned child*/
110110 char * h = 0 ;
111- h += atoi (* (argv + 1 ));
111+ h += _wtoi (* (argv + 1 ));
112112 if (h != 0 ) {
113113 log_init ("ssh-agent" , config_log_level (), 1 , 0 );
114114 agent_start (FALSE, TRUE, h );
@@ -146,7 +146,7 @@ int scm_start_service(DWORD num, LPWSTR* args) {
146146 ZeroMemory (& service_status , sizeof (service_status ));
147147 service_status .dwServiceType = SERVICE_WIN32_OWN_PROCESS ;
148148 ReportSvcStatus (SERVICE_START_PENDING , NO_ERROR , 300 );
149- ReportSvcStatus (SERVICE_RUNNING , NO_ERROR , 0 );
149+ ReportSvcStatus (SERVICE_RUNNING , NO_ERROR , 0 );
150150 log_init ("ssh-agent" , config_log_level (), 1 , 0 );
151151 agent_start (FALSE, FALSE, 0 );
152152 return 0 ;
0 commit comments