Project

Profile

Help

Bug #2137

closed

error: unknown type name 'TCHAR' on Mac OS X

Added by O'Neil Delpratt over 9 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Category:
Saxon-C Internals
Start date:
2014-09-01
Due date:
% Done:

100%

Estimated time:
Found in version:
0.3.1
Fixed in version:
1.0.2
Platforms:

Description

It was reported on the Mac OS X the following compile errors:

In file included from /Users/stephen/Documents/library/applications/saxon/Saxon-HEC-v0.3.1.1-Mac-native/Saxon-C-API/SaxonProcessor.cpp:15:
./php_saxon.cpp:71:6: error: unknown type name 'TCHAR'
            TCHAR s[256];
            ^
./php_saxon.cpp:74:13: error: unknown type name 'DWORD'
            DWORD a = GetCurrentDirectory(256, s);

The problem is the preprocessor directives assume linux and windows platforms only. There need to be directives for Mac OS X.

See workaround below:

Instead of :

 #ifndef __linux__

Replace with the following:

#if !(defined (__linux__) || (defined (__APPLE__) && defined(__MACH__)))

Please register to edit this issue

Also available in: Atom PDF