Network Kit: Fix parallel build
* HttpAuthentication.cpp wasn't in ssl grist resulting in unmet dependencies. #9523 * md5.c only being used when ssl wasn't available was kind of spaghetti logic. These changes make this more obvious.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2010 Haiku Inc. All rights reserved.
|
* Copyright 2010-2013 Haiku, Inc. All rights reserved.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -14,12 +14,12 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#define PRINT(x) printf x
|
#define PRINT(x) printf x
|
||||||
|
|
||||||
#ifdef OPENSSL_ENABLED
|
|
||||||
#define HAVE_OPENSSL // Instruct md5.h to include the openssl version
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
#ifdef OPENSSL_ENABLED
|
||||||
|
#include <openssl/md5.h>
|
||||||
|
#else
|
||||||
#include "md5.h"
|
#include "md5.h"
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef MD5_DIGEST_LENGTH
|
#ifndef MD5_DIGEST_LENGTH
|
||||||
|
|||||||
@@ -7,16 +7,20 @@ UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_network compat ]
|
|||||||
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
|
UseHeaders [ FDirName $(HAIKU_TOP) src libs compat freebsd_wlan ] : true ;
|
||||||
|
|
||||||
local sslSources ;
|
local sslSources ;
|
||||||
|
local md5Sources ;
|
||||||
if $(HAIKU_BUILD_FEATURE_OPENSSL_ENABLED) {
|
if $(HAIKU_BUILD_FEATURE_OPENSSL_ENABLED) {
|
||||||
SubDirC++Flags -DOPENSSL_ENABLED ;
|
SubDirC++Flags -DOPENSSL_ENABLED ;
|
||||||
SubDirSysHdrs $(HAIKU_OPENSSL_HEADERS) ;
|
SubDirSysHdrs $(HAIKU_OPENSSL_HEADERS) ;
|
||||||
sslSources = SSL.cpp ;
|
sslSources = SSL.cpp ;
|
||||||
Includes [ FGristFiles $(sslSources) SecureSocket.cpp ]
|
md5Sources = ;
|
||||||
|
Includes [ FGristFiles $(sslSources) SecureSocket.cpp HttpAuthentication.cpp ]
|
||||||
: $(HAIKU_OPENSSL_HEADERS_DEPENDENCY) ;
|
: $(HAIKU_OPENSSL_HEADERS_DEPENDENCY) ;
|
||||||
# Dependency needed to trigger downloading/unzipping the package before
|
# Dependency needed to trigger downloading/unzipping the package before
|
||||||
# compiling the files.
|
# compiling the files.
|
||||||
SetupFeatureObjectsDir ssl ;
|
SetupFeatureObjectsDir ssl ;
|
||||||
} else {
|
} else {
|
||||||
|
# As we don't have md5 from ssl, use our own
|
||||||
|
md5Sources = md5.c ;
|
||||||
SetupFeatureObjectsDir no-ssl ;
|
SetupFeatureObjectsDir no-ssl ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,7 +57,7 @@ SharedLibrary libbnetapi.so :
|
|||||||
HttpForm.cpp
|
HttpForm.cpp
|
||||||
HttpTime.cpp
|
HttpTime.cpp
|
||||||
|
|
||||||
md5.c
|
$(md5Sources)
|
||||||
|
|
||||||
Url.cpp
|
Url.cpp
|
||||||
UrlContext.cpp
|
UrlContext.cpp
|
||||||
|
|||||||
@@ -35,11 +35,11 @@
|
|||||||
* compile-time configuration.
|
* compile-time configuration.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef HAVE_OPENSSL
|
|
||||||
|
#include "md5.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "md5.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The basic MD5 functions.
|
* The basic MD5 functions.
|
||||||
@@ -291,5 +291,3 @@ void MD5_Final(unsigned char *result, MD5_CTX *ctx)
|
|||||||
|
|
||||||
memset(ctx, 0, sizeof(*ctx));
|
memset(ctx, 0, sizeof(*ctx));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -22,12 +22,10 @@
|
|||||||
*
|
*
|
||||||
* See md5.c for more information.
|
* See md5.c for more information.
|
||||||
*/
|
*/
|
||||||
|
#ifndef _MD5_H
|
||||||
#ifdef HAVE_OPENSSL
|
|
||||||
#include <openssl/md5.h>
|
|
||||||
#elif !defined(_MD5_H)
|
|
||||||
#define _MD5_H
|
#define _MD5_H
|
||||||
|
|
||||||
|
|
||||||
/* Any 32-bit or wider unsigned integer data type will do */
|
/* Any 32-bit or wider unsigned integer data type will do */
|
||||||
typedef unsigned int MD5_u32plus;
|
typedef unsigned int MD5_u32plus;
|
||||||
|
|
||||||
@@ -42,4 +40,5 @@ extern void MD5_Init(MD5_CTX *ctx);
|
|||||||
extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
|
extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
|
||||||
extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
|
extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user