]> The Tcpdump Group git mirrors - libpcap/commitdiff
Remove all remaining DOS props.
authorDenis Ovsienko <[email protected]>
Thu, 1 Feb 2024 00:17:22 +0000 (00:17 +0000)
committerDenis Ovsienko <[email protected]>
Thu, 1 Feb 2024 00:19:38 +0000 (00:19 +0000)
.gitignore
INSTALL.md
pcap-int.h
pcap/bpf.h
pcap/funcattrs.h
pcap/pcap-inttypes.h
pcap/pcap.h
savefile.c
sf-pcap.c

index d0c50eb6814361c2b80836a098a26e9883951130..9c560decfb2331242e3a92d77e87dd2a6f586e44 100644 (file)
@@ -61,7 +61,3 @@ CMakeFiles/
 *.vcxproj.user
 Debug/
 Release/
-/msdos/.depend.dj
-/msdos/bin2c.exe
-/msdos/pkt_rx1.lst
-/msdos/pkt_stub.inc
index 443818fe57f5c3b9cb5a5de26c0a72a4cc3e2c27..f1e5d1870cc97e0fb6b25e5d22cd8554ddbb2a85 100644 (file)
@@ -270,7 +270,6 @@ in `/usr/include/sys/dlpi.h`, and find the corresponding value.
        pcap-dbus.c         - D-Bus capture support
        pcap-dbus.h         - D-Bus capture support
        pcap-dlpi.c         - Data Link Provider Interface support
-       pcap-dos.c          - removed in 2023, after libpcap 1.10
        pcap-dpdk.c         - DPDK device support
        pcap-dpdk.h         - DPDK device support
        pcap-hurd.c         - GNU Hurd support
index 0cdcf89932852c4bb0c2ecbc42c9dad551aa53d6..b8677d0ed6e03509153c0210ebc3f82fb22a83c6 100644 (file)
@@ -55,7 +55,7 @@
  *
  * XXX - verify that we have at least C99 support on UN*Xes?
  *
- * What about MinGW or various DOS toolchains?  We're currently assuming
+ * What about MinGW?  We're currently assuming
  * sufficient C99 support there.
  */
 #if defined(_MSC_VER)
index 3970d0a18426321a2ad1d8278488521df2dc18bb..97970b795553f4b38468023dd5688adf2e597c62 100644 (file)
@@ -89,13 +89,8 @@ extern "C" {
 /* BSD style release date */
 #define BPF_RELEASE 199606
 
-#ifdef MSDOS /* must be 32-bit */
-typedef long          bpf_int32;
-typedef unsigned long bpf_u_int32;
-#else
 typedef        int bpf_int32;
 typedef        u_int bpf_u_int32;
-#endif
 
 /*
  * Alignment macros.  BPF_WORDALIGN rounds up to the next
index b9aa779799bd5fdb9c9e4b122dc38a857c842eb1..e1460a25808e9d29bdde90ec8dd4c6b797fdb4fd 100644 (file)
      */
     #define PCAP_API_DEF
   #endif
-#elif defined(MSDOS)
-  /* XXX - does this need special treatment? */
-  #define PCAP_API_DEF
 #else /* UN*X */
   #ifdef pcap_EXPORTS
     /*
      */
     #define PCAP_API_DEF
   #endif
-#endif /* _WIN32/MSDOS/UN*X */
+#endif /* _WIN32/UN*X */
 
 #define PCAP_API       PCAP_API_DEF extern
 
index efaf60813847105bef724f1d7810526554fb1b3e..e698353dae5737e0b29368d050f450ec374df637 100644 (file)
@@ -37,7 +37,7 @@
  *
  * XXX - verify that we have at least C99 support on UN*Xes?
  *
- * What about MinGW or various DOS toolchains?  We're currently assuming
+ * What about MinGW?  We're currently assuming
  * sufficient C99 support there.
  */
 #if defined(_MSC_VER)
@@ -84,9 +84,6 @@
    * environment, and thus have <inttypes.h> - and support for %zu in
    * the formatted printing functions.
    *
-   * If the target is MS-DOS, we assume we have <inttypes.h> - and support
-   * for %zu in the formatted printing functions.
-   *
    * I.e., assume we have <inttypes.h> and that it suffices.
    */
 
index fb8cbb79d9858f2fa7d86f445f133776f03d0048..2011108230b4bad2940e1b7a2e993134cbeabd38 100644 (file)
 #if defined(_WIN32)
   #include <winsock2.h>                /* u_int, u_char etc. */
   #include <io.h>              /* _get_osfhandle() */
-#elif defined(MSDOS)
-  #include <sys/types.h>       /* u_int, u_char etc. */
-  #include <sys/socket.h>
 #else /* UN*X */
   #include <sys/types.h>       /* u_int, u_char etc. */
   #include <sys/time.h>
-#endif /* _WIN32/MSDOS/UN*X */
+#endif /* _WIN32/UN*X */
 
 #include <pcap/socket.h>       /* for PCAP_SOCKET, as the active-mode rpcap APIs use it */
 
index 078d6358d6897c796f07012997fbe7e707b8bab1..35ad0ae0a4975db28df93e91db5878db417cba1d 100644 (file)
@@ -73,7 +73,7 @@ static pcap_t *pcap_fopen_offline_with_tstamp_precision(FILE *, u_int, char *);
 #endif
 
 /*
- * Setting O_BINARY on DOS/Windows is a bit tricky
+ * Setting O_BINARY on Windows is a bit tricky.
  */
 #if defined(_WIN32)
   #define SET_BINMODE(f)  _setmode(_fileno(f), _O_BINARY)
@@ -359,7 +359,7 @@ pcap_open_offline_with_tstamp_precision(const char *fname, u_int precision,
                            "The standard input is not open");
                        return (NULL);
                }
-#if defined(_WIN32) || defined(MSDOS)
+#if defined(_WIN32)
                /*
                 * We're reading from the standard input, so put it in binary
                 * mode, as savefiles are binary files.
@@ -375,8 +375,7 @@ pcap_open_offline_with_tstamp_precision(const char *fname, u_int precision,
                 * wraps fopen().
                 *
                 * "b" is supported as of C90, so *all* UN*Xes should
-                * support it, even though it does nothing.  For MS-DOS,
-                * we again need it.
+                * support it, even though it does nothing.
                 */
                fp = pcapint_charset_fopen(fname, "rb");
                if (fp == NULL) {
@@ -544,7 +543,7 @@ found:
        /* Padding only needed for live capture fcode */
        p->fddipad = 0;
 
-#if !defined(_WIN32) && !defined(MSDOS)
+#if !defined(_WIN32)
        /*
         * You can do "select()" and "poll()" on plain files on most
         * platforms, and should be able to do so on pipes.
index 4f21b50047b8e24cb538093bdcf9b98d5b92aed5..9d352f901c66beae91b686af78ef7025d9df4301 100644 (file)
--- a/sf-pcap.c
+++ b/sf-pcap.c
@@ -57,7 +57,7 @@
 #include "sf-pcap.h"
 
 /*
- * Setting O_BINARY on DOS/Windows is a bit tricky
+ * Setting O_BINARY on Windows is a bit tricky.
  */
 #if defined(_WIN32)
   #define SET_BINMODE(f)  _setmode(_fileno(f), _O_BINARY)
@@ -792,7 +792,7 @@ static pcap_dumper_t *
 pcap_setup_dump(pcap_t *p, int linktype, FILE *f, const char *fname)
 {
 
-#if defined(_WIN32) || defined(MSDOS)
+#if defined(_WIN32)
        /*
         * If we're writing to the standard output, put it in binary
         * mode, as savefiles are binary files.
@@ -998,7 +998,7 @@ pcap_dump_open_append(pcap_t *p, const char *fname)
                }
        }
 
-#if defined(_WIN32) || defined(MSDOS)
+#if defined(_WIN32)
        /*
         * We turn off buffering.
         * XXX - why?  And why not on the standard output?