summaryrefslogtreecommitdiff
path: root/machdep.c
Commit message (Collapse)AuthorAgeFilesLines
* Clean up includes for machdep.c.Guy Harris2020-05-141-7/+2
| | | | | If we're not building for Tru64 UNIX, we need only <stddef.h> to define size_t and "varattrs.h" to define _U_.
* Put back an #endif.Guy Harris2018-01-291-0/+2
| | | | | | Include <stdio.h> on Digital/Tru64 UNIX to get snprintf(); we assume the versions on which people will build this (if any) will have it. (1998 called, they want their C library back....)
* Add nd_{v}snprintf() routines/wrappers.Guy Harris2018-01-291-5/+0
| | | | | | | | Some versions of the MSVC runtime library have a non-C99-compliant vsnprintf(), which we want to avoid. On Windows, use snprintf() and vsnprintf() for VS 2015 and later, where they both exist in C99-compliant forms, and wrap _{v}snprintf_s() otherwise (they're guaranteed to do the null termination that we want).
* Always include <config.h> rather than "config.h".Guy Harris2018-01-211-1/+1
| | | | | | | | This can prevent bizarre failures if, for example, you've done a configuration in the top-level source directory, leaving behind one config.h file, and then do an out-of-tree build in another directory, with different configuration options. This way, we always pick up the same config.h, in the build directory.
* Use quoted include netdissect-stdinc.h instead of angle-bracketed oneFrancois-Xavier Le Bail2018-01-211-1/+1
|
* Handle attributes for function pointers by checking the compiler version.Guy Harris2017-08-191-9/+1
| | | | | | | | | | | Handle attributes for function pointers the same way we handle attributes for functions, by explicitly checking for the compiler version with #if rather than with a configure script check. That's one fewer thing that, if you're not using autoconf, has to be done in some other fashion. While we're at it, put NORETURN in the right place to have it work with Microsoft Visual Studio as well as various UN*X compilers.
* Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'Francois-Xavier Le Bail2015-09-101-1/+1
| | | | Get the full log via: git log --follow netdissect-stdinc.h
* Clarify what abort_on_misalignment() does.Guy Harris2014-09-031-0/+9
| | | | | | | | It doesn't request byte misalignment repair, it requests that byte misalignment kill the program with SIGBUS; on platforms that don't support aligned loads, we should be fetching possibly-misaligned data using some safe instruction sequence, not by doing misaligned loads and relying on them to trap to the kernel and be (slowly) emulated.
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-5/+0
| | | | | | Remove lots of $Header's and a few $Id's that all belong to the former CVS repository of tcpdump itself. These keywords have been frozen since the migration to git in late 2008.
* Avoid some warnings from Sun C.Guy Harris2013-06-221-1/+4
| | | | | | | | | | Some versions of Sun C support __attribute__ but don't support the "unused" or "format" attributes - they don't fail, but they whine a lot. They also support the "noreturn" attribute, but don't allow it to be applied to function pointers, only to functions. Check whether they can be used without warnings, and use them only if they can.
* _U_ is defined by the Makefile; we shouldn't redefine it ourselves.guy2003-12-151-3/+1
|
* Have the configure script arrange that the Makefile define _U_guy2003-11-161-8/+4
| | | | | | | | | | appropriately, and that GNUmakefile and the MSVC++ project file define it apppriately, as we do with libpcap, rather than defining it in "interface.h". Undo the rcsid-shuffling and addition of extra #includes, as we no longer need to arrange that "interface.h" be included before using _U_ in an RCS ID or copyright.
* From Neil Spring:guy2003-11-151-4/+8
| | | | | | | | | | | use "_U_" in the definitions of "rcsid[]", to eliminate complaints about those variables being unused; move the definitions after the include of "interface.h", or add an include of "interface.h", so that "_U_" is defined. Include "config.h" before including "tcpdump-stdinc.h" in "missing/datalinks.c".
* Get rid of the "-Wno-unused" flag, and fix up most of theguy2002-09-051-6/+8
| | | | | | | | | | | | | | | unused-parameter problems reported by GCC. Add an _U_ tag to label parameters as unused if the function is called through a pointer (so that you can't change its signature by removing parameters) or if there are unused parameters only because the function isn't complete. Add some additional bounds checks the necessity for which was revealed while cleaning up unused-parameter problems. Make some routines static. "lcp_print()", defined in "print-lcp.c", isn't called anywhere - "print-ppp.c" has the code to dissect LCP. Get rid of "print-lcp.c".
* Put in a comment about the #includes we should need.guy2002-08-061-1/+7
|
* Added support for Win32, based on WinPcap.risso2002-08-011-2/+3
|
* Declare "snprintf()" if we are pulling in our own "snprintf()", so thatguy2001-06-271-2/+11
| | | | we don't get compiler warnings about it being undeclared.
* s/sprintf/snprintf/.itojun2000-01-171-3/+3
| | | | | there seem to be couple of unsafe use of strcat and strcpy - we should bring in strl{cat,cpy}.
* Switch to config.h instead of passing defines in DEFS.fenner1999-11-211-1/+5
|
* Initial revisionmcr1999-10-071-0/+47