aboutsummaryrefslogtreecommitdiffstats
path: root/ws_attributes.h
AgeCommit message (Collapse)AuthorFilesLines
2017-11-09Start using SPDX license identifiers.Gerald Combs1-13/+1
A while back Graham pointed out the SPDX project (spdx.org), which is working on standardizing license specifications: https://www.wireshark.org/lists/wireshark-dev/201509/msg00119.html Appendix V of the specification describes a short identifier (SPDX-License-Identifier) that you can use in place of boilerplate in your source files: https://spdx.org/spdx-specification-21-web-version#h.twlc0ztnng3b Start the conversion process with our top-level C and C++ files. Change-Id: Iba1d835776714deb6285e2181e8ca17f95221878 Reviewed-on: https://code.wireshark.org/review/24302 Reviewed-by: Gerald Combs <gerald@wireshark.org> Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Balint Reczey <balint@balintreczey.hu> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-26Move the compiler version tests to ws_compiler_tests.h and use them elsewhere.Guy Harris1-113/+2
While we're at it, sort some header file lists, and clean up white space. Change-Id: If737dda45334fedf1df7295d8719ad9381daf7a1 Reviewed-on: https://code.wireshark.org/review/24089 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26Whitespace cleanups.Guy Harris1-5/+5
Change-Id: Ic19c143fc9143da230f286f1fe4aecc0fe8b08be Reviewed-on: https://code.wireshark.org/review/24085 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26Move a comment to where it belongs, expand another comment.Guy Harris1-10/+12
Change-Id: I04eff374132cbe4b93271c7a43303db406998bcb Reviewed-on: https://code.wireshark.org/review/24084 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26Use more than just "does it claim to be GCC?" to test for attributes.Guy Harris1-5/+135
Not all versions of GCC or Clang have the returns_nonnull function attribute, so use the same technique used in current master branch libpcap - use __has_attribute() if it's available, otherwise use compiler version tests. This also lets us use WS_NORETURN on some non-GCC compilers. Change-Id: I6ca4a81797ebfca9f743e16f83839c49d303da81 Reviewed-on: https://code.wireshark.org/review/24083 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-10-26Improve our inet_ntop() wrapperJoão Valverde1-0/+8
Also fix buffer length define, as it is not guaranteed to be 46 on Windows (it never was guaranteed anyway for the libc implementation, but the likelyhood of being greater was small). Change-Id: I2db705d86f825765ed32ec70b8d22058b5d629e8 Reviewed-on: https://code.wireshark.org/review/24074 Reviewed-by: João Valverde <j@v6e.pt>
2017-09-06plugins: config.h must not be included by public headersJoão Valverde1-0/+59
For a sane plugin build environment. Include config.h as the first header in the .c file instead. Fix by moving required compiler attribute macros to a new "ws_attributes.h" API header. Change-Id: I34f58a927f68c1a0e59686c14d214825149749e1 Reviewed-on: https://code.wireshark.org/review/23400 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>