Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to MSVC with CMake script #6

Merged
merged 4 commits into from
Apr 3, 2019

Conversation

harrysummer
Copy link
Contributor

@harrysummer harrysummer commented Apr 2, 2019

This is a supporting PR for the one in SILE. Please refer to sile-typesetter/sile#567 for an overview of the big picture.

Note:

  1. off_t are changed into off64_t entirely, because Windows have a definition for off_t to 32-bit integer and it's hard to override.
  2. Not sure why there is undefined IS_KANJI function in dpxfile.c. Looks like it's jumping one byte if its a Chinese character in the spawn argument. This is hacky so I commented it anyway. May need fix in the future for non-Latin support.

1. Add Win32 compatible header of dirent.h, unistd.h. Create a new win32.h to put other compatibility definitions.
2. Remove the folder in the include statement of libtexpdf/{libexpdf.h,config.h} since actually this directory does not appear in the repository.
3. change `off_t` to `off64_t` since the original type is defined to 32-bit integer in Windows and hard to change.
4. Remove invalid WIN32 macro blocks, including calling `fsyscp_fopen`, `win32_vfprintf`. (these function does not exist)
5. Other small fixes like adding missing header.
@simoncozens
Copy link
Member

Works for me with the new commit (2405616) to allow building on OS X.

@simoncozens simoncozens merged commit 17e49ac into sile-typesetter:master Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants