Revision 1919 trunk/server/main.c
| main.c (revision 1919) | ||
|---|---|---|
| 259 | 259 | 
                  char *errors = NULL;  | 
              
| 260 | 260 | 
                  char *warnings = NULL;  | 
              
| 261 | 261 | 
                  NGConfigOpts opts;  | 
              
| 262 | 
                  #ifdef WIN32  | 
              |
| 263 | 
                  WORD wVersionRequested;  | 
              |
| 264 | 
                  WSADATA wsaData;  | 
              |
| 265 | 
                  int ret;  | 
              |
| 266 | 
                  #endif  | 
              |
| 267 | 262 | 
                   | 
              
| 268 | 263 | 
                  #if !defined(DARWIN) && !defined(WIN32) && !defined(ENABLE_GUI)  | 
              
| 269 | 264 | 
                  gboolean do_fork = FALSE;  | 
              
| ... | ... | |
| 303 | 298 | 
                   | 
              
| 304 | 299 | 
                  nntpgrab_utils_perform_base_initialization();  | 
              
| 305 | 300 | 
                   | 
              
| 306 | 
                  #ifdef WIN32  | 
              |
| 307 | 
                  // exchndl.dll is part of Dr. MinGW. By loading this DLL, every time the  | 
              |
| 308 | 
                  // program crashes a .RPT file will be created containing the backtrace  | 
              |
| 309 | 
                      LoadLibraryA("exchndl.dll");
                 | 
              |
| 310 | 
                   | 
              |
| 311 | 
                  // Initialise Winsock  | 
              |
| 312 | 
                  wVersionRequested = MAKEWORD(2, 2);  | 
              |
| 313 | 
                   | 
              |
| 314 | 
                  ret = WSAStartup(wVersionRequested, &wsaData);  | 
              |
| 315 | 
                      if (ret != 0) {
                 | 
              |
| 316 | 
                  /* Tell the user that we could not find a usable */  | 
              |
| 317 | 
                  /* WinSock DLL. */  | 
              |
| 318 | 
                          g_error(_("Winsock could not be initialised"));
                 | 
              |
| 319 | 
                  return -1;  | 
              |
| 320 | 
                  }  | 
              |
| 321 | 
                   | 
              |
| 322 | 
                  /* Confirm that the WinSock DLL supports 2.2. */  | 
              |
| 323 | 
                  /* Note that if the DLL supports versions greater */  | 
              |
| 324 | 
                  /* than 2.2 in addition to 2.2, it will still return */  | 
              |
| 325 | 
                  /* 2.2 in wVersion since that is the version we */  | 
              |
| 326 | 
                  /* requested. */  | 
              |
| 327 | 
                   | 
              |
| 328 | 
                  if (LOBYTE( wsaData.wVersion ) != 2 ||  | 
              |
| 329 | 
                          HIBYTE( wsaData.wVersion ) != 2) {
                 | 
              |
| 330 | 
                  /* Tell the user that we could not find a usable */  | 
              |
| 331 | 
                  /* WinSock DLL. */  | 
              |
| 332 | 
                  WSACleanup();  | 
              |
| 333 | 
                   | 
              |
| 334 | 
                          g_error(_("Winsock 2.2 or higher is required for this program"));
                 | 
              |
| 335 | 
                   | 
              |
| 336 | 
                  return -1;  | 
              |
| 337 | 
                  }  | 
              |
| 338 | 
                  #endif  | 
              |
| 339 | 
                   | 
              |
| 340 | 301 | 
                  #ifdef ENABLE_GUI  | 
              
| 341 | 302 | 
                  // Is there an graphical environment running?  | 
              
| 342 | 303 | 
                  #if !defined(WIN32) && !defined(DARWIN)  | 
              
Also available in: Unified diff
NNTPGrab

