The less than perfect way to compile a debug library

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

The less than perfect way to compile a debug library

Dennis Clarke-2


This is based on the sickly things that happen on Solaris as documented
by various people at :

https://github.com/openssl/openssl/issues/6912

One must do :

/*
  * Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
  */

/*
  * Check to see if there is a conflict between complex.h and openssl/rsa.h.
  * The former defines "I" as a macro and earlier versions of the latter use
  * for function arguments.
  */
#if defined(__STDC_VERSION__)
# if __STDC_VERSION__ >= 199901L
#  include <complex.h>
# endif
#endif
#include <openssl/rsa.h>
#include <stdlib.h>

/* per https://github.com/openssl/openssl/issues/6912 */
#pragma weak OPENSSL_sk_pop_free
#pragma weak OPENSSL_sk_dup
#pragma weak OPENSSL_sk_pop
#pragma weak OPENSSL_sk_num
#pragma weak OPENSSL_sk_new
#pragma weak OPENSSL_sk_set
#pragma weak OPENSSL_sk_free
#pragma weak OPENSSL_sk_find
#pragma weak OPENSSL_sk_push
#pragma weak OPENSSL_sk_sort
#pragma weak OPENSSL_sk_zero
#pragma weak OPENSSL_sk_is_sorted
#pragma weak OPENSSL_sk_shift
#pragma weak OPENSSL_sk_value
#pragma weak OPENSSL_sk_delete_ptr
#pragma weak OPENSSL_sk_unshift
#pragma weak OPENSSL_sk_new_null
#pragma weak OPENSSL_sk_set_cmp_func
#pragma weak OPENSSL_sk_reserve
#pragma weak OPENSSL_sk_new_reserve
#pragma weak OPENSSL_sk_delete
#pragma weak OPENSSL_sk_insert
#pragma weak OPENSSL_sk_deep_copy
#pragma weak OPENSSL_sk_find_ex

int main(int argc, char *argv[])
{
     /* There are explicitly no run time checks for this one */
     return EXIT_SUCCESS;
}

That is horrific but allows a strict C99 compile to proceed.

Dennis
--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Reply | Threaded
Open this post in threaded view
|

Re: The less than perfect way to compile a debug library

Dennis Clarke-2
On 1/18/19 3:32 AM, Dennis Clarke wrote:
>
>
> This is based on the sickly things that happen on Solaris as documented
> by various people at :

fixed .. done

https://github.com/openssl/openssl/pull/7721/commits/23dcef5ad68efe6f6882328de5948ae6820000fb


>
> https://github.com/openssl/openssl/issues/6912

Dennis

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users