Project

Profile

Help

Bug #2137

closed

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

Added by O'Neil Delpratt over 10 years ago. Updated over 8 years ago.

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

100%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
0.3.1
Fixed in version:
1.0.2
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

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__)))
Actions #1

Updated by O'Neil Delpratt almost 10 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

Actions #2

Updated by O'Neil Delpratt over 8 years ago

  • Fixed in version set to 1.0.2

Bug fix applied in the Saxon/C 1.0.2 maintenance release

Actions #3

Updated by O'Neil Delpratt over 8 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF