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:
Peter Johnson
2018-04-29 23:36:18 -07:00
parent f84018af5f
commit a28832e52f
59 changed files with 1004 additions and 0 deletions

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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_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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"