#include "compat/cmsg.h"
-// MacOS GCC 4.0.1 and 4.2.1 supply __GNUC_GNU_INLINE__ but do not actually define __attribute__((gnu_inline))
-#if defined(__cplusplus) && !defined(_SQUID_EXTERNNEW_)
-#define _SQUID_EXTERNNEW_ extern inline
-#endif
-
#endif /* _SQUID_APPLE_ */
#endif /* SQUID_OS_MACOSX_H */
#define _ABI_SOURCE
#endif /* USE_ASYNC_IO */
-#if defined(__cplusplus) && !defined(_SQUID_EXTERNNEW_) && !defined(_GNUC_)
-/*
- * The gcc compiler treats extern inline functions as being extern,
- * while the SGI MIPSpro compilers treat them as inline. To get equivalent
- * behavior, remove the inline keyword.
- */
-#define _SQUID_EXTERNNEW_ extern
-#endif
-
#endif /* _SQUID_SGI_ */
#endif /* SQUID_OS_SGI_H */
SQUIDCEXTERN int gethostname(char *, int);
#endif
-/*
- * SunPro CC handles extern inline as inline, PLUS extern symbols.
- */
-#if !defined(_SQUID_EXTERNNEW_) && defined(__SUNPRO_CC)
-#define _SQUID_EXTERNNEW_ extern
-#endif
-
/*
* SunStudio CC does not define C++ portability API __FUNCTION__
*/
+++ /dev/null
-/*
- * Copyright (C) 1996-2016 The Squid Software Foundation and contributors
- *
- * Squid software is distributed under GPLv2+ license and includes
- * contributions from numerous individuals and organizations.
- * Please see the COPYING and CONTRIBUTORS files for details.
- */
-
-#ifndef SQUID_NEW_H
-#define SQUID_NEW_H
-
-#if !defined(__SUNPRO_CC) && !defined(__clang__)
-/* Any code using libstdc++ must have externally resolvable overloads
- * for void * operator new - which means in the .o for the binary,
- * or in a shared library. static libs don't propogate the symbol
- * so, look in the translation unit containing main() in squid
- * for the extern version in squid
- */
-#include <new>
-
-_SQUID_EXTERNNEW_ void *operator new(size_t size) throw (std::bad_alloc)
-{
- return xmalloc(size);
-}
-_SQUID_EXTERNNEW_ void operator delete (void *address) throw()
-{
- xfree(address);
-}
-_SQUID_EXTERNNEW_ void *operator new[] (size_t size) throw (std::bad_alloc)
-{
- return xmalloc(size);
-}
-_SQUID_EXTERNNEW_ void operator delete[] (void *address) throw()
-{
- xfree(address);
-}
-
-#endif /* !__SUNPRO_CC && !__clang__*/
-
-#endif /* SQUID_NEW_H */
-
SQUIDCEXTERN int tvSubUsec(struct timeval, struct timeval);
SQUIDCEXTERN double tvSubDsec(struct timeval, struct timeval);
SQUIDCEXTERN void Tolower(char *);
-#if defined(__cplusplus)
-/*
- * Any code using libstdc++ must have externally resolvable overloads
- * for void * operator new - which means in the .o for the binary,
- * or in a shared library. static libs don't propogate the symbol
- * so, look in the translation unit containing main() in squid
- * for the extern version in squid
- */
-#if !defined(_SQUID_EXTERNNEW_)
-#if defined(__GNUC_STDC_INLINE__) || defined(__GNUC_GNU_INLINE__)
-#define _SQUID_EXTERNNEW_ extern inline __attribute__((gnu_inline))
-#else
-#define _SQUID_EXTERNNEW_ extern inline
-#endif
-#endif
-#include "SquidNew.h"
-#endif
SQUIDCEXTERN time_t parse_iso3307_time(const char *buf);
/* DEBUG: none Memory Allocation */
-#define _SQUID_EXTERNNEW_
-
#include "squid.h"
-#ifdef __SUNPRO_CC
+#if !defined(__clang__)
#include <new>
-void *operator new(size_t size) throw (std::bad_alloc)
+
+void *operator new(size_t size)
{
return xmalloc(size);
}
-void operator delete (void *address) throw()
+void operator delete(void *address)
{
- xfree (address);
+ xfree(address);
}
-void *operator new[] (size_t size) throw (std::bad_alloc)
+void *operator new[](size_t size)
{
return xmalloc(size);
}
-void operator delete[] (void *address) throw()
+void operator delete[](void *address)
{
- xfree (address);
+ xfree(address);
}
-#endif /* __SUNPRO_CC */
+void *operator new(size_t size, const std::nothrow_t &tag)
+{
+ return xmalloc(size);
+}
+void operator delete(void *address, const std::nothrow_t &tag)
+{
+ xfree(address);
+}
+void *operator new[](size_t size, const std::nothrow_t &tag)
+{
+ return xmalloc(size);
+}
+void operator delete[](void *address, const std::nothrow_t &tag)
+{
+ xfree(address);
+}
+#endif /* !defined(__clang__) */