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

Re: (ITS#5604) sbin executable names not recognised on Win32



h.b.furuseth@usit.uio.no wrote:
> Might be better to insert the following at the end of
> libraries/liblutil/utils.c:lutil_progname():
>
> #if<something>
> 	{
> 		size_t len = strlen( progname );
> 		if ( len>  4&&  strcasecmp( progname + len - 4, ".exe" ) == 0 )
> 			progname[len - 4] = '\0';
> 	}
> #endif
>
> I have no idea what the #if should be though.  Does #ifdef _WIN32 still
> work with cross-compilation?
>
Yes.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/