Skip to content

Commit c6e18bc

Browse files
authored
Merge pull request #88 from CyberShadow/no-object-files
Properly make these bindings a "header-only" (.di) library
2 parents 2dfc552 + 14681ce commit c6e18bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+33
-47
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ jobs:
140140
# We don't checkout in $GITHUB_WORKSPACE to avoid polluting the repository with artifacts,
141141
# e.g. the C openssl library or Vibe.d
142142
cd ${{ github.workspace }}/deimos-openssl/
143-
dub test
144143
cd examples/sslecho/
145144
${{ github.workspace }}/openssl/install/bin/openssl req -batch -newkey rsa:4096 -x509 -sha256 -days 3650 -subj "/C=GB/CN=localhost" -nodes -out cert.pem -keyout key.pem
146145
dub build

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Generated version file
2-
/source/deimos/openssl/version_.d
2+
/source/deimos/openssl/version_.di
33

44
# DUB artifacts
55
/.dub/

dub.sdl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,3 @@ configuration "library-manual-version" {
2121
configuration "library-applink" {
2222
targetType "sourceLibrary"
2323
}
24-
25-
configuration "unittest" {
26-
targetType "executable"
27-
targetName "openssl-test-library"
28-
dflags "-main"
29-
excludedSourceFiles "source/deimos/openssl/applink.d"
30-
preGenerateCommands `${DUB} scripts/generate_version.d` platform="posix"
31-
versions `DeimosOpenSSLAutoDetect`
32-
}

scripts/generate_version.d

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
* It is called directly as a `preGenerateCommand` (see dub.sdl).
1515
* To use it with another build system, pass the directory in which to write
16-
* the `version_.d` file as first and only argument. The directory
16+
* the `version_.di` file as first and only argument. The directory
1717
* must exist, this script will not create it.
1818
*/
1919
module generate_version;
@@ -42,14 +42,14 @@ void main(string[] args)
4242
{
4343
assert(args[1].isDir(),
4444
"OpenSSL version detection: Argument '" ~ args[1] ~ "' is not a directory");
45-
target = args[1].buildPath("version_.d");
45+
target = args[1].buildPath("version_.di");
4646
}
4747
else
4848
{
4949
assert(args.length == 1,
5050
"OpenSSL version detection expects only one argument, " ~
51-
"a directory path where to write `version_.d`");
52-
target = TARGET_DIR_PATH.buildPath("version_.d");
51+
"a directory path where to write `version_.di`");
52+
target = TARGET_DIR_PATH.buildPath("version_.di");
5353
}
5454

5555
string opensslVersion;
File renamed without changes.

source/deimos/openssl/aes.d renamed to source/deimos/openssl/aes.di

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* crypto/aes/aes.h -*- mode:C; c-file-style: "eay" -*- */
21
/* ====================================================================
32
* Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
43
*
File renamed without changes.
File renamed without changes.
File renamed without changes.

source/deimos/openssl/asn1t.d renamed to source/deimos/openssl/asn1t.di

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ enum ASN1_TFLG_NDEF = (0x1<<11);
564564
/* This is the actual ASN1 item itself */
565565

566566
struct ASN1_ITEM_st {
567-
char itype; /* The item type, primitive, SEQUENCE, CHOICE or extern */
567+
ubyte itype; /* The item type, primitive, SEQUENCE, CHOICE or extern */
568568
c_long utype; /* underlying type */
569569
const(ASN1_TEMPLATE)* templates; /* If SEQUENCE or CHOICE this contains the contents */
570570
c_long tcount; /* Number of templates if SEQUENCE or CHOICE */
@@ -639,7 +639,7 @@ enum ASN1_ITYPE_NDEF_SEQUENCE = 0x6;
639639
*/
640640

641641
struct ASN1_TLC_st{
642-
char valid; /* Values below are valid */
642+
ubyte valid; /* Values below are valid */
643643
int ret; /* return value */
644644
c_long plen; /* length */
645645
int ptag; /* class value */

0 commit comments

Comments
 (0)