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/Base64.h
Normal file
16
wpiutil/src/main/native/include/support/Base64.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/Base64.h is deprecated; include wpi/Base64.h instead"
|
||||
#else
|
||||
#warning "support/Base64.h is deprecated; include wpi/Base64.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/Base64.h"
|
||||
16
wpiutil/src/main/native/include/support/ConcurrentQueue.h
Normal file
16
wpiutil/src/main/native/include/support/ConcurrentQueue.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/ConcurrentQueue.h is deprecated; include wpi/ConcurrentQueue.h instead"
|
||||
#else
|
||||
#warning "support/ConcurrentQueue.h is deprecated; include wpi/ConcurrentQueue.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/ConcurrentQueue.h"
|
||||
16
wpiutil/src/main/native/include/support/HttpUtil.h
Normal file
16
wpiutil/src/main/native/include/support/HttpUtil.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/HttpUtil.h is deprecated; include wpi/HttpUtil.h instead"
|
||||
#else
|
||||
#warning "support/HttpUtil.h is deprecated; include wpi/HttpUtil.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/HttpUtil.h"
|
||||
16
wpiutil/src/main/native/include/support/HttpUtil.inl
Normal file
16
wpiutil/src/main/native/include/support/HttpUtil.inl
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/HttpUtil.inl is deprecated; include wpi/HttpUtil.inl instead"
|
||||
#else
|
||||
#warning "support/HttpUtil.inl is deprecated; include wpi/HttpUtil.inl instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/HttpUtil.inl"
|
||||
16
wpiutil/src/main/native/include/support/Logger.h
Normal file
16
wpiutil/src/main/native/include/support/Logger.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/Logger.h is deprecated; include wpi/Logger.h instead"
|
||||
#else
|
||||
#warning "support/Logger.h is deprecated; include wpi/Logger.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/Logger.h"
|
||||
16
wpiutil/src/main/native/include/support/SafeThread.h
Normal file
16
wpiutil/src/main/native/include/support/SafeThread.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/SafeThread.h is deprecated; include wpi/SafeThread.h instead"
|
||||
#else
|
||||
#warning "support/SafeThread.h is deprecated; include wpi/SafeThread.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/SafeThread.h"
|
||||
16
wpiutil/src/main/native/include/support/UidVector.h
Normal file
16
wpiutil/src/main/native/include/support/UidVector.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/UidVector.h is deprecated; include wpi/UidVector.h instead"
|
||||
#else
|
||||
#warning "support/UidVector.h is deprecated; include wpi/UidVector.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/UidVector.h"
|
||||
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"
|
||||
16
wpiutil/src/main/native/include/support/condition_variable.h
Normal file
16
wpiutil/src/main/native/include/support/condition_variable.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/condition_variable.h is deprecated; include wpi/condition_variable.h instead"
|
||||
#else
|
||||
#warning "support/condition_variable.h is deprecated; include wpi/condition_variable.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/condition_variable.h"
|
||||
16
wpiutil/src/main/native/include/support/deprecated.h
Normal file
16
wpiutil/src/main/native/include/support/deprecated.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/deprecated.h is deprecated; include wpi/deprecated.h instead"
|
||||
#else
|
||||
#warning "support/deprecated.h is deprecated; include wpi/deprecated.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/deprecated.h"
|
||||
16
wpiutil/src/main/native/include/support/hostname.h
Normal file
16
wpiutil/src/main/native/include/support/hostname.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/hostname.h is deprecated; include wpi/hostname.h instead"
|
||||
#else
|
||||
#warning "support/hostname.h is deprecated; include wpi/hostname.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/hostname.h"
|
||||
16
wpiutil/src/main/native/include/support/jni_util.h
Normal file
16
wpiutil/src/main/native/include/support/jni_util.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/jni_util.h is deprecated; include wpi/jni_util.h instead"
|
||||
#else
|
||||
#warning "support/jni_util.h is deprecated; include wpi/jni_util.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/jni_util.h"
|
||||
16
wpiutil/src/main/native/include/support/json.h
Normal file
16
wpiutil/src/main/native/include/support/json.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/json.h is deprecated; include wpi/json.h instead"
|
||||
#else
|
||||
#warning "support/json.h is deprecated; include wpi/json.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/json.h"
|
||||
16
wpiutil/src/main/native/include/support/leb128.h
Normal file
16
wpiutil/src/main/native/include/support/leb128.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/leb128.h is deprecated; include wpi/leb128.h instead"
|
||||
#else
|
||||
#warning "support/leb128.h is deprecated; include wpi/leb128.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/leb128.h"
|
||||
16
wpiutil/src/main/native/include/support/mutex.h
Normal file
16
wpiutil/src/main/native/include/support/mutex.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/mutex.h is deprecated; include wpi/mutex.h instead"
|
||||
#else
|
||||
#warning "support/mutex.h is deprecated; include wpi/mutex.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/mutex.h"
|
||||
@@ -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/priority_condition_variable.h is deprecated; include wpi/priority_condition_variable.h instead"
|
||||
#else
|
||||
#warning "support/priority_condition_variable.h is deprecated; include wpi/priority_condition_variable.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/priority_condition_variable.h"
|
||||
16
wpiutil/src/main/native/include/support/priority_mutex.h
Normal file
16
wpiutil/src/main/native/include/support/priority_mutex.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/priority_mutex.h is deprecated; include wpi/priority_mutex.h instead"
|
||||
#else
|
||||
#warning "support/priority_mutex.h is deprecated; include wpi/priority_mutex.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/priority_mutex.h"
|
||||
16
wpiutil/src/main/native/include/support/raw_istream.h
Normal file
16
wpiutil/src/main/native/include/support/raw_istream.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/raw_istream.h is deprecated; include wpi/raw_istream.h instead"
|
||||
#else
|
||||
#warning "support/raw_istream.h is deprecated; include wpi/raw_istream.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/raw_istream.h"
|
||||
16
wpiutil/src/main/native/include/support/raw_socket_istream.h
Normal file
16
wpiutil/src/main/native/include/support/raw_socket_istream.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/raw_socket_istream.h is deprecated; include wpi/raw_socket_istream.h instead"
|
||||
#else
|
||||
#warning "support/raw_socket_istream.h is deprecated; include wpi/raw_socket_istream.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/raw_socket_istream.h"
|
||||
16
wpiutil/src/main/native/include/support/raw_socket_ostream.h
Normal file
16
wpiutil/src/main/native/include/support/raw_socket_ostream.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/raw_socket_ostream.h is deprecated; include wpi/raw_socket_ostream.h instead"
|
||||
#else
|
||||
#warning "support/raw_socket_ostream.h is deprecated; include wpi/raw_socket_ostream.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/raw_socket_ostream.h"
|
||||
16
wpiutil/src/main/native/include/support/sha1.h
Normal file
16
wpiutil/src/main/native/include/support/sha1.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/sha1.h is deprecated; include wpi/sha1.h instead"
|
||||
#else
|
||||
#warning "support/sha1.h is deprecated; include wpi/sha1.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/sha1.h"
|
||||
16
wpiutil/src/main/native/include/support/timestamp.h
Normal file
16
wpiutil/src/main/native/include/support/timestamp.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/timestamp.h is deprecated; include wpi/timestamp.h instead"
|
||||
#else
|
||||
#warning "support/timestamp.h is deprecated; include wpi/timestamp.h instead"
|
||||
#endif
|
||||
|
||||
#include "wpi/timestamp.h"
|
||||
Reference in New Issue
Block a user