mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
A number of POSIX methods were renamed on Windows to match standards requirements, giving deprecation warnings when calling strdup on Windows. This adds a wrapper, to allow calling _strdup on Windows instead. Part of #16256
21 lines
630 B
C++
21 lines
630 B
C++
// Copyright 2013 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef FLUTTER_FML_POSIX_WRAPPERS_H_
|
|
#define FLUTTER_FML_POSIX_WRAPPERS_H_
|
|
|
|
#include "flutter/fml/build_config.h"
|
|
|
|
// Provides wrappers for POSIX functions that have been renamed on Windows.
|
|
// See
|
|
// https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4996?view=vs-2019#posix-function-names
|
|
// for context.
|
|
namespace fml {
|
|
|
|
char* strdup(const char* str1);
|
|
|
|
} // namespace fml
|
|
|
|
#endif // FLUTTER_FML_POSIX_WRAPPERS_H_
|