mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Add backwards compatibility shims for old wpiutil headers.
These generate a warning when included, then include the old header. Note for GCC, #warning is used; this requires -std=gnu++14 instead of -std=c++14 (otherwise the warning is treated as an error because #warning is a GNU extension). On MSVC, #pragma message is used, which is a bit unsatisfactory as the message doesn't say where it was included from. The llvm shim headers also include a llvm namespace shim.
This commit is contained in:
16
wpiutil/src/main/native/include/support/atomic_static.h
Normal file
16
wpiutil/src/main/native/include/support/atomic_static.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma message "warning: support/atomic_static.h is deprecated; include wpi/atomic_static.h instead"
|
||||
#else
|
||||
#warning "support/atomic_static.h is deprecated; include wpi/atomic_static.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/atomic_static.h"
|
||||
Reference in New Issue
Block a user