Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions analytics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,28 +129,8 @@ target_compile_definitions(firebase_analytics
PRIVATE
-DINTERNAL_EXPERIMENTAL=1
)
# Automatically include headers that might not be declared.
if(IOS)
if(MSVC)
target_compile_options(firebase_analytics PRIVATE
$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:/FI"assert.h">
$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:/FI"string.h">
$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:/FI"stdint.h">)
else()
target_compile_options(firebase_analytics PRIVATE
$<$<NOT:$<COMPILE_LANGUAGE:Swift>>:SHELL:-include assert.h -include string.h>
)
endif()
else()
if(MSVC)
target_compile_options(firebase_analytics PRIVATE
/FI"assert.h" /FI"string.h" /FI"stdint.h")
else()
target_compile_options(firebase_analytics PRIVATE
SHELL:-include assert.h -include string.h
)
endif()
endif()



if(ANDROID)
firebase_cpp_proguard_file(analytics)
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics_desktop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <cstdint>
#include <future>
#include <map>
#include <mutex>
Expand Down
1 change: 1 addition & 0 deletions analytics/src/analytics_desktop_dynamic.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

// --- Copied from original header ---
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

typedef struct GoogleAnalytics_Reserved_Opaque GoogleAnalytics_Reserved;
Expand Down
2 changes: 2 additions & 0 deletions analytics/src/analytics_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#import "FIRAnalytics+OnDevice.h"
#import "FIRAnalytics.h"

#include <cassert>
#include <cstdint>
#include "analytics/src/analytics_common.h"
#include "analytics/src/include/firebase/analytics.h"

Expand Down
22 changes: 0 additions & 22 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -308,28 +308,6 @@ else()
set(app_flatbuffers_lib flatbuffers)
endif()

# Automatically include headers that might not be declared.
# We use add_compile_options (instead of target_compile_options) so these
# implicit includes apply globally to all targets in this directory,
# including tests. Generator expressions ($<$<COMPILE_LANGUAGE:...>) are
# used to ensure these C/C++ headers are not passed to the Swift compiler.
if(MSVC)
add_compile_options(
$<$<COMPILE_LANGUAGE:CXX>:/FI"assert.h">
$<$<COMPILE_LANGUAGE:CXX>:/FI"string.h">
$<$<COMPILE_LANGUAGE:CXX>:/FI"stdint.h">)
elseif(APPLE)
add_compile_options(
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include assert.h>"
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include string.h>"
"$<$<COMPILE_LANGUAGE:OBJCXX>:SHELL:-include assert.h>"
"$<$<COMPILE_LANGUAGE:OBJCXX>:SHELL:-include string.h>")
else()
add_compile_options(
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include assert.h>"
"$<$<COMPILE_LANGUAGE:CXX>:SHELL:-include string.h>")
endif()

add_library(firebase_app STATIC
${log_SRCS}
${log_HDRS}
Expand Down
6 changes: 0 additions & 6 deletions app/rest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ target_link_libraries(firebase_rest_lib
zlibstatic
${CMAKE_DL_LIBS}
)
# Automatically include headers that might not be declared.
if(MSVC)
add_definitions(/FI"assert.h" /FI"string.h" /FI"stdint.h")
else()
add_definitions(-include assert.h -include string.h)
endif()

# Add shared definitions across all platforms, and then platform specific ones.
add_definitions(
Expand Down
1 change: 1 addition & 0 deletions app/rest/controller_curl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "app/rest/controller_curl.h"

#include <cstdint>
#include <utility>

#include "app/rest/transport_curl.h"
Expand Down
2 changes: 2 additions & 0 deletions app/rest/gzipheader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <assert.h>

#include <algorithm>
#include <cstdint>
#include <cstring>

#include "app/src/assert.h"
#include "app/src/util.h"
Expand Down
1 change: 1 addition & 0 deletions app/rest/request_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef FIREBASE_APP_REST_REQUEST_JSON_H_
#define FIREBASE_APP_REST_REQUEST_JSON_H_

#include <cassert>
#include <string>

#include "app/rest/request.h"
Expand Down
2 changes: 2 additions & 0 deletions app/rest/request_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef FIREBASE_APP_REST_REQUEST_OPTIONS_H_
#define FIREBASE_APP_REST_REQUEST_OPTIONS_H_

#include <stdint.h>

#include <map>
#include <string>

Expand Down
2 changes: 2 additions & 0 deletions app/rest/response_json.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#ifndef FIREBASE_APP_REST_RESPONSE_JSON_H_
#define FIREBASE_APP_REST_RESPONSE_JSON_H_

#include <cassert>
#include <cstring>
#include <string>
#include <utility>

Expand Down
1 change: 1 addition & 0 deletions app/rest/transport_curl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "app/rest/transport_curl.h"

#include <cassert>
#include <cstdint>
#include <deque>
#include <map>

Expand Down
1 change: 1 addition & 0 deletions app/rest/transport_mock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "app/rest/transport_mock.h"

#include <cstring>
#include <string>

#include "app/rest/util.h"
Expand Down
1 change: 1 addition & 0 deletions app/rest/zlibwrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <stdio.h>

#include <algorithm>
#include <cstring>
#include <memory>
#include <string>

Expand Down
1 change: 1 addition & 0 deletions app/src/app_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <jni.h>
#include <string.h>

#include <cassert>
#include <string>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions app/src/app_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <assert.h>
#include <string.h>

#include <cstdint>
#include <map>
#include <memory>
#include <string>
Expand Down
2 changes: 2 additions & 0 deletions app/src/app_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
* limitations under the License.
*/

#include <cassert>
#include <cstring>
#include "app/src/include/firebase/app.h"

#include <dispatch/dispatch.h>
Expand Down
1 change: 1 addition & 0 deletions app/src/app_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <string.h>

#include <cassert>
#include <cstdint>
#include <string>

Expand Down
2 changes: 2 additions & 0 deletions app/src/app_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

#include <string.h>

#include <cassert>

#include "app/src/app_common.h"
#include "app/src/assert.h"
#include "app/src/function_registry.h"
Expand Down
1 change: 1 addition & 0 deletions app/src/base64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "app/src/base64.h"

#include <cassert>
#include <cstdint>

#include "app/src/assert.h"
Expand Down
5 changes: 3 additions & 2 deletions app/src/base64_fuzzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
*/

#include <cassert>
#include <cstdint>
#include <string>

#include "app/src/base64.h"

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Test encoding and decoding this string with various permutations of
// options.
std::string orig(reinterpret_cast<const char *>(data), size);
std::string orig(reinterpret_cast<const char*>(data), size);
std::string encoded, decoded;
bool success;
success = firebase::internal::Base64Encode(orig, &encoded);
Expand Down
1 change: 1 addition & 0 deletions app/src/filesystem_apple.mm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <cstring>
#include "app/src/filesystem.h"

#import <Foundation/Foundation.h>
Expand Down
2 changes: 2 additions & 0 deletions app/src/filesystem_desktop_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include <sys/types.h>
#include <unistd.h>

#include <cstring>

#include "app/src/filesystem.h"
#include "app/src/util.h"

Expand Down
1 change: 1 addition & 0 deletions app/src/filesystem_desktop_windows.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <shlobj.h>
#include <stringapiset.h>

#include <cstring>
#include <string>

#include "app/src/filesystem.h"
Expand Down
1 change: 1 addition & 0 deletions app/src/heartbeat/heartbeat_storage_desktop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "app/src/heartbeat/heartbeat_storage_desktop.h"

#include <codecvt>
#include <cstdint>
#include <fstream>
#include <locale>
#include <regex>
Expand Down
2 changes: 2 additions & 0 deletions app/src/jobject_reference.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

#include <jni.h>

#include <cassert>

#include "app/src/assert.h"
// util_android.h is included for GetThreadsafeJNIEnv()
#include "app/src/util_android.h"
Expand Down
3 changes: 3 additions & 0 deletions app/src/locale.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@

#include "app/src/locale.h"

#include <cstdint>
#include <cstring>

#include "app/src/include/firebase/internal/platform.h"
#include "app/src/log.h"

Expand Down
1 change: 1 addition & 0 deletions app/src/log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <stdarg.h>
#include <stdio.h>

#include <cassert>
#include <cstdlib>

#include "app/src/assert.h"
Expand Down
1 change: 1 addition & 0 deletions app/src/log_ios.mm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

#include <cassert>
#include "app/src/log.h"

#import <Foundation/Foundation.h>
Expand Down
2 changes: 2 additions & 0 deletions app/src/mutex_pthread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <errno.h>
#include <pthread.h>

#include <cassert>

#include "app/src/assert.h"
#include "app/src/include/firebase/internal/mutex.h"

Expand Down
2 changes: 2 additions & 0 deletions app/src/mutex_windows.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
#include <windows.h>

#include <cassert>

#include "app/src/assert.h"
#include "app/src/include/firebase/internal/mutex.h"
#include "app/src/include/firebase/internal/platform.h"
Expand Down
5 changes: 4 additions & 1 deletion app/src/pthread_condvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@
#ifndef FIREBASE_APP_SRC_PTHREAD_CONDVAR_H_
#define FIREBASE_APP_SRC_PTHREAD_CONDVAR_H_

#include <cstdint>

#include "app/src/include/firebase/internal/platform.h"

#if !FIREBASE_PLATFORM_WINDOWS

#include <errno.h>
#include <pthread.h>

#include <cerrno>

#include "app/src/time.h"

namespace firebase {
Expand Down
1 change: 1 addition & 0 deletions app/src/reference_counted_future_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "app/src/reference_counted_future_impl.h"

#include <algorithm>
#include <cassert>
#include <cstdint>
#include <string>

Expand Down
1 change: 1 addition & 0 deletions app/src/reference_counted_future_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef FIREBASE_APP_SRC_REFERENCE_COUNTED_FUTURE_IMPL_H_
#define FIREBASE_APP_SRC_REFERENCE_COUNTED_FUTURE_IMPL_H_

#include <cassert>
#include <functional>
#include <map>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions app/src/scheduler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "app/src/scheduler.h"

#include <cassert>
#include <cstdint>
#include <utility>

#include "app/src/time.h"
Expand Down
1 change: 1 addition & 0 deletions app/src/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef FIREBASE_APP_SRC_SCHEDULER_H_
#define FIREBASE_APP_SRC_SCHEDULER_H_

#include <cstdint>
#include <memory>
#include <queue>

Expand Down
1 change: 1 addition & 0 deletions app/src/secure/user_secure_darwin_internal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#include "app/src/secure/user_secure_darwin_internal.h"
#include <cassert>
#include <functional>
#include "app/src/assert.h"
#include "app/src/base64.h"
Expand Down
1 change: 1 addition & 0 deletions app/src/secure/user_secure_darwin_internal_testlib.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// limitations under the License.

#include "app/src/secure/user_secure_darwin_internal_testlib.h"
#include <cstring>

#include "app/src/log.h"

Expand Down
2 changes: 2 additions & 0 deletions app/src/secure/user_secure_fake_internal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

#include "app/src/secure/user_secure_fake_internal.h"

#include <cstring>

#include "app/src/include/firebase/internal/platform.h"
#include "app/src/log.h"

Expand Down
Loading
Loading