[pcre-dev] [Bug 699] New: pcretest compile error on windows

Top Page
Delete this message
Author: Daniel Bergström
Date:  
To: pcre-dev
Subject: [pcre-dev] [Bug 699] New: pcretest compile error on windows
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=699
           Summary: pcretest compile error on windows
           Product: PCRE
           Version: N/A
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
        AssignedTo: ph10@???
        ReportedBy: daniel@???
                CC: pcre-dev@???



Compiling PCRE 7.6 on a Windows XP SP2 with Microsoft Visual Studio 2008.

When compiling pcretest utility with readline support, it fails when including
the unistd.h file. This only occurs when the SUPPORT_LIBREADLINE is defined.
Adding a
#ifdef HAVE_UNISTD_H around the include solves this problem.

However, it then fails on the functions isatty() and fileno() since they are
implemented on windows with an underscore in front of them. Adding the below
defines within the #if defined(_WIN32) ... block, allows for a successful and
functional binary.

#define isatty _isatty
#define fileno _fileno


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email