Ignore:
Timestamp:
2022-09-22T12:12:01+12:00 (19 months ago)
Author:
kjdon
Message:

modified a few apache files (APacheMonitor.c, modules.mk.win, apr_atomic.c) to get it to compile on VS 2017. all changes in the code are tagged with kjdon 2022, and notes added to the README

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/packages/apache-httpd/README.txt

    r22850 r36650  
    44*****************************************
    55
    6 This Readme explains the customisations made to binary files and
     6This Readme explains the customisations made Apache Httpd
    77zipped files in this folder.
    8 
    9 
    10 * The first is the Apache Httpd 2, whose unmodified source code was
    11   originally being compiled up on Linux alone. The first
    12   greenstone-modified version was added to include windows makefiles
    13   to compile the Linux source code.
    14 
    158
    169********************************************************************************************
     
    1811modifications for Greenstone.
    1912********************************************************************************************
     13
     14Sep 2022 - kjdon
     15
     16I have updated a few of the windows files so that it will compile using Visual Studio 2017. Note, I'm not sure what version below this is the cutoff for these
     17changes not to be needed.
     18Also note, the windows version of 2.2.11 is for win32, so you need to use vcvars32, not vcvars64 when setting up Visual Studio environment.
     19
     20The following files were modified. All mods are signalled with kjdon 2022 in comments. The help pages where I found these solutions plus some info from them detailed also.
     21
     22***** ./httpd-2.2.11/srclib/apr/atomic/win32/apr_atomic.c
     23---------------------------------------------------------
     24
     25see https://marc.info/?l=apr-dev&m=138386228311375&w=2
     26
     27
     28In the Platform Toolset v120 (VS2013), the function InterlockedIncrement() and the friends are specified with
     29
     30#pragma intrinsic(_InterlockedIncrement)
     31
     32for all the platforms, including x86. Whereas in the former versions of SDK, the intrisnic pragma directive is used for x64 but NOT for x86. I can clearly see the difference comparing the header files. And there doesn't seem to be any defines which would allow us to revert the behavior.
     33
     34Thus, the function casts introduced in apr_atomic.c resolve/work for former versions but cause link errors with v120 since the function calls for x86 are now intrinsic as they have been for x64.
     35
     36Given all these differences between platforms and toolset versions, I'd simply not use the function cast wrappers but still take care of the differences between APR and underlying Windows interfaces.)
     37
     38***** ./httpd-2.2.11/srclib/apr-iconv/build/modules.mk.win
     39----------------------------------------------------------
     40
     41see https://stackoverflow.com/questions/36897691/compile-apache-apr-on-windows
     42
     43***** ./httpd-2.2.11/support/win32/ApacheMonitor.c
     44---------------------------------------------------
     45
     46see https://lists.apache.org/thread/9rkox41zmhc6g1nb1jx4h9ph02zklkrv
     47
     48setargv() is supposed to read in the console args because that's a GUI app
     49and they have to use WinMain. For that to work, one should actually link
     50with setargv.obj
     51https://msdn.microsoft.com/en-us/library/8bch7bkk%28v=vs.140%29.aspx . That
     52is not being done, so not sure how it even works with VC9/VC11. First I
     53tried to declare UNICODE, but that's a bad idea - the whole app isn't
     54prepared for that. Thus, I've tried to remove the _setargv() call.
     55
     56That worked - under VC14 argv seems to be set
     57
     58
     59******************************************************************
    2060
    2161This Readme file was originally created on 22 July 2010. The dates in
     
    2565at the bottom.
    2666
     67* Apache Httpd 2, whose unmodified source code was
     68  originally being compiled up on Linux alone. The first
     69  greenstone-modified version was added to include windows makefiles
     70  to compile the Linux source code.
    2771
    2872The httpd tar.gz file works with the files httpd.conf.in for linux and
Note: See TracChangeset for help on using the changeset viewer.