Rename C++ header files to .hpp Rename all C++ header files (include/**/*-internal.h, src/**/*.h except argpar and msgpack, some headers in tests) to have the .hpp extension. Doing so highlights that we include some C++ header files in some test files still compiled as C. This is ok for now, as the files they include don't actually contain C++ code incompatible with C yet, but they could eventually. This is something we can fix later. Change-Id: I8bf326b6b2946a3e26704f3ef3ac5831bbe9bc26 Signed-off-by: Simon Marchi <simon.marchi@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Relicence all source and header files included in LGPL code All code included in libcommon-lgpl.a should be LGPL. Some were licensed as GPLv2 by mistake. We need to relicense those. EfficiOS owns the copyright to all of the affected source files and agrees to this relicensing from GPLv2 to LGPLv2.1. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: Ib4aa1a7cc8a6f8e2a9891f1bd05c7ea2f8530e9b
Fix: C++ syntax of macOS compat code Minors fixes to the macOS compat code to build with a C++ compiler following the conversion of the binaries. Change-Id: Ic879d56d0025c838d5a34b0b45d02bae02a12053 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Build fix: retrieve unix socket peer PID on non-unix platforms The previous attempt at extending the credential retrieval wrapper was broken and didn't build on FreeBSD, macOS, and cygwin. A platform-specific way of retrieving the PID of a unix peer is implemented for FreeBSD (getsockopt using LOCAL_PEERCRED, note that the cr_pid field is only available from FreeBSD 13 and up), macOS (getsockopt using LOCAL_PEERPID, macOS 10.8+), and Solaris (getpeerucreds). Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: Ifcf522c70ee4c2e0799293ae0961f41aebff5056
unix: receive pid on non-linux platforms Add a `pid` to the lttng_sock_cred structure definition used on non-Linux platforms and receive the peer's PID when receiving credentials. Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com> Change-Id: I9c92f6dda6441deca58f9cc85f846f5031cceb6e
port: FreeBSD has no ENODATA, alias it to ENOATTR According to 'the internet' ENOATTR is used in a similar fashion to ENODATA on the BSDs and we used it internally only anyway. Change-Id: Ia4e77fd6d28c9dfb43f99ddba6c32369384827f0 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Move to kernel style SPDX license identifiers The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. See https://spdx.org/ids-how for details. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Change-Id: I62e7038e191a061286abcef5550b58f5ee67149d Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
License header fixes Most of the source files had the wrong FSF address. Also reworded the first paragraph so that licensecheck's regexes actually pick up the version number. I made sure lttng.h and lttng-ctl.c advertise LGPL-2.1. Every other file touched in this patch was and remains under GPL2, please make sure this is correct. (Some files related to the RCU hashtable are under LGPL-2.1+, but their headers were already clean). (closes #155) Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com> Signed-off-by: David Goulet <dgoulet@efficios.com>
Revert FreeBSD compatibility layer Move those commits to the compat-freebsd branch instead of master branch which is currently between release canditate and stable and this compat layer will NOT go into 2.0-stable. Revert "Fix rest of the code to support compat layer" This reverts commit a440509044c2828bf6dbfb05e8d9d6d0277ce1a4. Revert "Fix consumer to handle compat layer" This reverts commit fbb2c21aac1386b7752f6254b2bd0bf001fa0ac1. Revert "Multiple fix for FreeBSD compat layer" This reverts commit bcc5eeb02fcad910c4de961b040351dad31b6f9f. Revert "Add multiple FreeBSD compat layer" This reverts commit d50813007e79158828e8ee6e1b5444950bc90847. Revert "Add FreeBSD compat layer for splice and sync_file_range" This reverts commit 826a02a292d2bd409be87ea96ba2fccbccee76b1. Revert "Support XSI strerror_r in error.h" This reverts commit e672cc585c3d67ee80278e29b538a3aed65df825. Revert "Add FreeBSD compat layer for socket.h" This reverts commit ef50a575de02a28aa158d7ba34b3d20ea329751a. Revert "Fix FreeBSD support for rculfhash mmap" This reverts commit e21193ea4abf7d93112b8ad3144ba11484d623c6. Revert "Add FreeBSD compat layer for endian.h" This reverts commit ae9d96fe577c198df432102cde69a28e82cccc1b. Signed-off-by: David Goulet <dgoulet@efficios.com>