delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/12/13/11:46:21

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Thu, 13 Dec 2012 17:45:22 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Openssl program not compiling
Message-ID: <20121213164522.GB6237@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <20121213153749 DOT 139670 AT gmx DOT com>
MIME-Version: 1.0
In-Reply-To: <20121213153749.139670@gmx.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Dec 13 16:37, Eduardo Chappa wrote:
> Hello,
> 
>   I am trying to understand why a program that used to compile before, now it does not. I can make the program compile if I switch the order of the #include directives.
> [...]
> #include <stdio.h>
> #include <windows.h>
> #include <openssl/bio.h>
> 
> int main(int argc, char *argv[])
> {
> return 0;
> }
> 
> In this case, the program is compiled using the command
> 
> > gcc fail.c
> 
> and it fails with the following error:
> 
> In file included from /usr/include/openssl/crypto.h:131:0,
>                  from /usr/include/openssl/bio.h:69,
>                  from a.c:3:
> /usr/include/openssl/ossl_typ.h:153:29: error: expected ‘)’ before numeric constant
> /usr/include/openssl/ossl_typ.h:199:33: error: expected ‘)’ before numeric constant
> 
> This used to work in the past, there was no need to switch the order, but it fails now. Why?

Because the new Windows headers from Mingw64 define X509_NAME and
OCSP_RESPONSE, which the former Mingw32 Windows headers didn't.

Try this:

  #define NOCRYPT
  #include <windows.h>
  #include <openssl/bio.h>

or better, drop including windows.h and use POSIX functionality only.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019