Skip to content

Commit e5dd716

Browse files
authored
PHPC-2195: Use less ambiguous path in mongocrypt.h compat include (#1407)
Add an ifndef block so we're not just relying on the actual mongocrypt.h include. Add copyright headers to libmongocrypt-compat headers.
1 parent 4e9da57 commit e5dd716

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

src/libmongocrypt-compat/mongocrypt-export.h

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2020-present MongoDB, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
#ifndef MONGOCRYPT_EXPORT_H
218
#define MONGOCRYPT_EXPORT_H
319

Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1-
#include "../libmongocrypt/src/mongocrypt.h"
1+
/*
2+
* Copyright 2020-present MongoDB, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#ifndef PHONGO_COMPAT_MONGOCRYPT_H
18+
#define PHONGO_COMPAT_MONGOCRYPT_H
19+
20+
/* This header forwards includes for "mongocrypt/mongocrypt.h" to the desired
21+
* header in the bundled libmongocrypt submodule. This is used when compiling
22+
* bundled versions of libmongoc and libmongocrypt and is necessary because
23+
* libmongocrypt's source directory is not named "mongocrypt/".
24+
*
25+
* This path is relative to the PHPC project directory to avoid ambiguity. */
26+
#include "src/libmongocrypt/src/mongocrypt.h"
27+
28+
#endif /* PHONGO_COMPAT_MONGOCRYPT_H */

0 commit comments

Comments
 (0)