[Date Prev][Date Next] [Chronological] [Thread] [Top]

servers/slapd/daemon.c doesn't compile (ITS#2605)



Full_Name: Arlene Berry
Version: 2.1.21
OS: Windows 2000
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (207.108.202.70)


I'm building slapd on Windows 2000 with DevStudio 6.  When I switched from a
single-threaded build to a multi-threaded build, I got this error:

servers\slapd\daemon.c(2039) : error C2181: illegal else without matching if
Error executing cl.exe.

An examination of the code:

#if HAVE_NT_SERVICE_MANAGER && SIGBREAK
	if (is_NT_Service && sig == SIGBREAK)
#if 0
#ifdef NEW_LOGGING
	    LDAP_LOG( CONNECTION, CRIT,
		    "slap_sig_shutdown: SIGBREAK ignored.\n", 0, 0, 0 );
#else
	    Debug(LDAP_DEBUG_TRACE, "slap_sig_shutdown: SIGBREAK ignored.\n",
		  0, 0, 0);
#endif
#endif
else
#endif

revealed an empty if clause due to the "#if 0".  Putting {} around it fixed the
error.