Project

Profile

Help

Bug #2137

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

Added by O'Neil Delpratt almost 4 years ago. Updated almost 2 years ago.

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

100%

Found in version:
0.3.1
Fixed in version:
1.0.2

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__)))

History

#1 Updated by O'Neil Delpratt over 3 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Bug fixed and committed to subversion. Patch will be applied in the next release of Saxon/C

#2 Updated by O'Neil Delpratt almost 2 years ago

  • Fixed in version set to 1.0.2

Bug fix applied in the Saxon/C 1.0.2 maintenance release

#3 Updated by O'Neil Delpratt almost 2 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF