[
https://issues.apache.org/jira/browse/AXIS2C-1567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Robert Lazarski resolved AXIS2C-1567.
-------------------------------------
Fix Version/s: 2.0.0
Resolution: Fixed
The unistd.h include was incorrectly excluded on Apple platforms with
#ifndef __APPLE__, but the F_OK, R_OK, W_OK, X_OK constants from that
header were still being used, causing compilation failures on macOS.
Fix:
- Remove the incorrect #ifndef __APPLE__ exclusion
- Add fallback #ifndef definitions for all access() mode constants
- Use standard POSIX values (F_OK=0, X_OK=1, W_OK=2, R_OK=4)
The fallback approach is defensive - if unistd.h provides the constants,
they're used; otherwise the standard POSIX values are defined.
> F_OK not defined with MacOSX builds
> -----------------------------------
>
> Key: AXIS2C-1567
> URL: https://issues.apache.org/jira/browse/AXIS2C-1567
> Project: Axis2-C
> Issue Type: Bug
> Components: core/engine
> Environment: MacOSX Lion
> Reporter: Stefan Radomski
> Priority: Major
> Fix For: 2.0.0
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> When building the current SVN trunk on a Mac, there are undefined F_OK and
> R_OK macros all over the place. These get defined in unistd.h and simply
> adding #include <unistd.h> to the affected files will compile them just fine
> on a Mac. Files missing the F_OK macro definitions are:
> arch_reader.c
> dep_engine.c
> conf_init.c
> http_server_main.c
> I added the following lines to each of these files includes:
> #ifdef __GNUC__
> #include <unistd.h>
> #endif
> But I am sure that somewhere in the platform sensing code there is a place
> where this would make more sense.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]