Well, the problem is actually not as complicated as it may have seemed. Let me clarify a bit.
In the Platform Toolset v120 (VS2013), the function InterlockedIncrement() and the friends are specified with
for 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.
Thus, 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.
Given 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. The attached patch allows to build the APR library without any warnings or errors on/for both x86 and x64. Tested using VS2005, VS2010, and VS2013. Should also work for VS2008 and VS2012, not sure about VC6, though. I'd also combine the cases (#ifdefs) for x86 and x64 in apr_atomic.c.