Edit report at https://bugs.php.net/bug.php?id=61193&edit=1
ID: 61193 Updated by: ras...@php.net Reported by: sam at robots dot org dot uk Summary: PHP_EOL definition for Mac OS X is wrong and unused -Status: Open +Status: Closed Type: Bug Package: *General Issues PHP Version: 5.4.0RC8 -Assigned To: +Assigned To: rasmus Block user comment: N Private report: N New Comment: Not sure how it can be both unused and wrong. It gets set to "\n" because __MacOSX__ doesn't exist. I agree the intent of the code is wrong now, but the end result is correct. I have cleaned it up. Previous Comments: ------------------------------------------------------------------------ [2012-02-27 12:16:33] ras...@php.net Automatic comment from SVN on behalf of rasmus Revision: http://svn.php.net/viewvc/?view=revision&revision=323577 Log: Fix bug 61193 ------------------------------------------------------------------------ [2012-02-27 11:47:05] sam at robots dot org dot uk Description: ------------ php.h contains: #ifdef PHP_WIN32 # include "tsrm_win32.h" # include "win95nt.h" # ifdef PHP_EXPORTS # define PHPAPI __declspec(dllexport) # else # define PHPAPI __declspec(dllimport) # endif # define PHP_DIR_SEPARATOR '\\' # define PHP_EOL "\r\n" #else # if defined(__GNUC__) && __GNUC__ >= 4 # define PHPAPI __attribute__ ((visibility("default"))) # else # define PHPAPI # endif #define THREAD_LS #define PHP_DIR_SEPARATOR '/' #if defined(__MacOSX__) #define PHP_EOL "\r" #else #define PHP_EOL "\n" #endif #endif The indentation is bad, the value of PHP_EOL on Mac OS X is wrong, and the code never gets into the line that defines it incorrectly because there is no such macro as __MacOSX__. Instead you should test for __APPLE__ & __MACH__, in general, but in this case you should just remove the whole test for __MacOSX__ because it's not needed. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61193&edit=1