Compiling httpd's open.c under Windows VS2008 IDE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

I downloaded and extracted Apache httpd 2.2.16, opened Apache.sln under Windows for VS2008, selected “Release – Win32” and right clicked  “httpd”, Rebuild.    I keep hitting the following error under the libapr build:

 

.\file_io\win32\open.c(608) : error C2065: 'wto_path' : undeclared identifier

.\file_io\win32\open.c(608) : warning C4047: 'function' : 'LPCSTR' differs in levels of indirection from 'int'

.\file_io\win32\open.c(608) : warning C4024: 'CreateHardLinkA' : different types for formal and actual parameter 1

 

The code snippet is this:

 

#if APR_HAS_UNICODE_FS

    IF_WIN_OS_IS_UNICODE

    {

        apr_wchar_t wfrom_path[APR_PATH_MAX];

        apr_wchar_t wto_path[APR_PATH_MAX];

 

        if (rv = utf8_to_unicode_path(wfrom_path, sizeof(wfrom_path)

                                               / sizeof(apr_wchar_t), from_path))

            return rv;

        if (rv = utf8_to_unicode_path(wto_path, sizeof(wto_path)

                                               / sizeof(apr_wchar_t), to_path))

            return rv;

 

        if (!CreateHardLinkW(wto_path, wfrom_path, NULL))

                return apr_get_os_error();

    }

#endif

#if APR_HAS_ANSI_FS

    ELSE_WIN_OS_IS_ANSI {

        if (!CreateHardLinkA(wto_path, wfrom_path))

                return apr_get_os_error()

    }

#endif

 

“wto_path” is locally scoped in the “if” part of the statement, but it is not defined in the “else”.    Additionally, CreateHardLinkA need 3 parameters.

 

I “searched” both the Wiki and FAQs, but did not find any other references to this error.  Has anyone else hit it and found a resolution?    I am using Microsoft VS2008 under a Windows 7 x32 system.

 

My apologies if this has already been addressed somewhere else.  Any links would be appreciated.

 

Regards,  Jim


P Please consider the environment before printing this e-mail.


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux