[poppler] very trivial patch for NSS3 library
suzuki toshiya
mpsuzuki at hiroshima-u.ac.jp
Thu Dec 21 11:47:03 UTC 2017
Dear Oliver,
Thank you for taking care. Umm, you're correct.
One of my old machine has libnss3 3.14.3 whose hasht.h does not include prtypes.h,
like this.
========================================================================
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* $Id: hasht.h,v 1.11 2013/02/05 18:10:46 wtc%google.com Exp $ */
#ifndef _HASHT_H_
#define _HASHT_H_
/* Opaque objects */
typedef struct SECHashObjectStr SECHashObject;
typedef struct HASHContextStr HASHContext;
/*
* The hash functions the security library supports
* NOTE the order must match the definition of SECHashObjects[]!
*/
typedef enum {
========================================================================
But, more recent machine with libnss3 3.28.4 whose hasht.h includes
prtypes.h.
========================================================================
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef _HASHT_H_
#define _HASHT_H_
#include "prtypes.h"
/* Opaque objects */
typedef struct SECHashObjectStr SECHashObject;
typedef struct HASHContextStr HASHContext;
/*
* The hash functions the security library supports
* NOTE the order must match the definition of SECHashObjects[]!
*/
typedef enum {
========================================================================
It would be possible to check libnss version, to exclude too old
version. Yet I'm unfamiliar with cmake, so what I could propose
would be a check by pkg-config. It would be considerable option?
Regards,
mpsuzuki
Oliver Sander wrote:
> Hmm. Doesn't that sound more like a bug in hasht.h? In any case,
> the file hasht.h on my machine (Debian testing) starts with
> #include "prtypes.h".
>
> Best,
> Oliver
>
> On 21.12.2017 08:56, suzuki toshiya wrote:
>> Hi,
>>
>> For signature calculation, poppler can use Mozilla's NSS3 library
>> optionally. I receive a compiler error against PRBool types, because
>> it is used by hasht.h before including its definition in prtypes.h.
>> Here is a trivial patch to include prtypes.h before hasht.h.
>>
>> Regards,
>> mpsuzuki
>>
>>
>>
>> _______________________________________________
>> poppler mailing list
>> poppler at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/poppler
>>
>
More information about the poppler
mailing list