Ticket #53122: patch-missing-prototypes.diff

File patch-missing-prototypes.diff, 4.8 KB (added by RJVB (René Bertin), 8 years ago)

adds the missing function declarations

  • decryptionresult.cpp

    old new  
    3737#include <istream>
    3838
    3939#include <string.h>
     40// string.h only declares strdup() if __DARWIN_C_LEVEL >= 200112L.
     41// Don't mess with that macro, just provide the prototype:
     42extern "C" {
     43extern char *strdup(const char *);
     44}
    4045
    4146class GpgME::DecryptionResult::Private
    4247{
  • encryptionresult.cpp

    old new  
    3737#include <iterator>
    3838
    3939#include <string.h>
     40// string.h only declares strdup() if __DARWIN_C_LEVEL >= 200112L.
     41// Don't mess with that macro, just provide the prototype:
     42extern "C" {
     43extern char *strdup(const char *);
     44}
    4045
    4146class GpgME::EncryptionResult::Private
    4247{
  • importresult.cpp

    old new  
    3333#include <cstring>
    3434
    3535#include <string.h>
     36// string.h only declares strdup() if __DARWIN_C_LEVEL >= 200112L.
     37// Don't mess with that macro, just provide the prototype:
     38extern "C" {
     39extern char *strdup(const char *);
     40}
    3641
    3742class GpgME::ImportResult::Private
    3843{
  • keygenerationresult.cpp

    old new  
    3333#include <cstdlib>
    3434
    3535#include <string.h>
     36// string.h only declares strdup() if __DARWIN_C_LEVEL >= 200112L.
     37// Don't mess with that macro, just provide the prototype:
     38extern "C" {
     39extern char *strdup(const char *);
     40}
    3641
    3742class GpgME::KeyGenerationResult::Private
    3843{
  • signingresult.cpp

    old new  
    3737#include <iterator>
    3838
    3939#include <string.h>
     40// string.h only declares strdup() if __DARWIN_C_LEVEL >= 200112L.
     41// Don't mess with that macro, just provide the prototype:
     42extern "C" {
     43extern char *strdup(const char *);
     44}
    4045
    4146class GpgME::SigningResult::Private
    4247{
  • swdbresult.cpp

    old new  
    3131
    3232#include "gpgme.h"
    3333
     34#include <string.h>
     35// string.h only declares strdup() if __DARWIN_C_LEVEL >= 200112L.
     36// Don't mess with that macro, just provide the prototype:
     37extern "C" {
     38extern char *strdup(const char *);
     39}
     40
    3441class GpgME::SwdbResult::Private
    3542{
    3643public:
  • lang/cpp/src/

    old new  
    2828#include <istream>
    2929#include "util.h"
    3030
     31#include <string.h>
     32// string.h only declares strdup() if __DARWIN_C_LEVEL >= 200112L.
     33// Don't mess with that macro, just provide the prototype:
     34extern "C" {
     35extern char *strdup(const char *);
     36}
     37
    3138class GpgME::TofuInfo::Private
    3239{
    3340public:
  • verificationresult.cpp

    old new  
    4141#include <cstdlib>
    4242
    4343#include <string.h>
     44// string.h only declares strdup() if __DARWIN_C_LEVEL >= 200112L.
     45// Don't mess with that macro, just provide the prototype:
     46extern "C" {
     47extern char *strdup(const char *);
     48}
    4449
    4550class GpgME::VerificationResult::Private
    4651{
  • vfsmountresult.cpp

    old new  
    3232
    3333#include <istream>
    3434#include <string.h>
     35// string.h only declares strdup() if __DARWIN_C_LEVEL >= 200112L.
     36// Don't mess with that macro, just provide the prototype:
     37extern "C" {
     38extern char *strdup(const char *);
     39}
    3540
    3641using namespace GpgME;
    3742
  • lang/qt/src/

    old new  
    3737
    3838#include "dn.h"
    3939
     40#include <strings.h>
     41
    4042static const struct {
    4143    const char *name;
    4244    const char *oid;
     
    165167    for (unsigned int i = 0; i < numOidMaps; ++i)
    166168        if (!strcasecmp((char *)p, oidmap[i].oid)) {
    167169            free(p);
    168             p = strdup(oidmap[i].name);
     170            p = qstrdup(oidmap[i].name);
    169171            break;
    170172        }
    171173    array->key = p;
  • lang/qt/tests/

    old new  
    4242    char *getPassphrase(const char * /*useridHint*/, const char * /*description*/,
    4343                        bool /*previousWasBad*/, bool &/*canceled*/) Q_DECL_OVERRIDE
    4444    {
    45         return strdup("abc");
     45        return qstrdup("abc");
    4646    }
    4747};
    4848} // namespace GpgME