Skip to content

Commit bb4a514

Browse files
committed
CTCI-WIN fix.(Windows only; no affect to non-Windows)
1 parent 6334b27 commit bb4a514

File tree

2 files changed

+15
-51
lines changed

2 files changed

+15
-51
lines changed

tt32api.h

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* (http://www.hercules-390.org/herclic.html) as modifications to */
66
/* Hercules. */
77

8-
// Copyright (C) 2002-2013, Software Development Laboratories, "Fish" (David B. Trout)
8+
// Copyright (C) 2002-2015, Software Development Laboratories, "Fish" (David B. Trout)
99
/////////////////////////////////////////////////////////////////////////////////////////
1010
//
1111
// TT32API.h -- TunTap32 DLL exported functions interface
@@ -20,33 +20,6 @@
2020
// any type of app that can access a DLL: VB, C/C++, PowerBuilder, etc.
2121
//
2222
/////////////////////////////////////////////////////////////////////////////////////////
23-
//
24-
// Change History:
25-
//
26-
// 12/22/01 1.0.0 Created.
27-
// 07/20/02 2.0.0 JAP: LCS modifications/enhancements.
28-
// 07/02/03 2.0.2 use std 'uint32_t' type instead of Win32 DWORD
29-
// 06/16/04 2.1.0 'ex' variant functions to pass errno value.
30-
// 11/01/03 3.1.0 TT32MINMTU, TT32MAXMTU, TT32DEFMTU
31-
// 11/03/03 3.1.0 TT32_MAX_MULTICAST_LIST_ENTRIES
32-
// 12/31/03 3.1.0 support for deprecated functions dropped/deleted.
33-
// 02/05/06 3.1.0 New exported function: 'tuntap32_build_herc_iface_mac'
34-
// 02/14/06 3.1.0 Added #defines for TUNTAP32_DLLNAME
35-
// 04/14/06 3.1.0 Added 'tuntap32_calc_checksum' function
36-
// 07/02/06 3.1.2 Added #defines for min/max/def buffer sizes
37-
// 08/09/06 3.1.6 Added 'tuntap32_calc_checksum' function
38-
// mm/dd/07 3.2.0 VS2005 + x64 + WinPCap 4.0
39-
// 11/06/08 3.3.0 VS2008 + auto-link pragma.
40-
// 11/06/08 3.3.0 Additional counters...
41-
// 05/18/10 3.3.0 Additional zero MAC address counters...
42-
// 01/17/11 3.3.0 Added socketpair
43-
// 02/03/11 3.3.0 _O_TT32NOTIFY packet arrival notification option
44-
// 03/08/11 3.3.0 tuntap32_beg_write_multi, tuntap32_end_write_multi
45-
// 03/10/11 3.3.0 Add '_ex' entry-points for calc_checksum,
46-
// calc_inet_checksum and build_herc_iface_mac.
47-
// 02/21/13 3.3.0 Added #include for new "TT32if.h" header
48-
//
49-
//////////////////////////////////////////////////////////////////////////////////////////
5023

5124
#ifndef _TT32API_H_
5225
#define _TT32API_H_
@@ -57,32 +30,34 @@
5730
// TunTap32.dll name
5831
/////////////////////////////////////////////////////////////////////////////////////////
5932

33+
#define TUNTAP_APPNAME "TunTap"
34+
6035
#if defined(_WIN64)
6136
#if defined(_UNICODE) || defined(UNICODE)
6237
#if defined(_DEBUG) || defined(DEBUG)
63-
#define BASE_TUNTAP32_NAME "TunTap64UD"
64-
#else
65-
#define BASE_TUNTAP32_NAME "TunTap64U"
38+
#define BASE_TUNTAP32_NAME TUNTAP_APPNAME "64UD"
39+
#else
40+
#define BASE_TUNTAP32_NAME TUNTAP_APPNAME "64U"
6641
#endif
6742
#else
6843
#if defined(_DEBUG) || defined(DEBUG)
69-
#define BASE_TUNTAP32_NAME "TunTap64D"
44+
#define BASE_TUNTAP32_NAME TUNTAP_APPNAME "64D"
7045
#else
71-
#define BASE_TUNTAP32_NAME "TunTap64"
46+
#define BASE_TUNTAP32_NAME TUNTAP_APPNAME "64"
7247
#endif
7348
#endif
7449
#else
7550
#if defined(_UNICODE) || defined(UNICODE)
7651
#if defined(_DEBUG) || defined(DEBUG)
77-
#define BASE_TUNTAP32_NAME "TunTap32UD"
78-
#else
79-
#define BASE_TUNTAP32_NAME "TunTap32U"
52+
#define BASE_TUNTAP32_NAME TUNTAP_APPNAME "32UD"
53+
#else
54+
#define BASE_TUNTAP32_NAME TUNTAP_APPNAME "32U"
8055
#endif
8156
#else
8257
#if defined(_DEBUG) || defined(DEBUG)
83-
#define BASE_TUNTAP32_NAME "TunTap32D"
58+
#define BASE_TUNTAP32_NAME TUNTAP_APPNAME "32D"
8459
#else
85-
#define BASE_TUNTAP32_NAME "TunTap32"
60+
#define BASE_TUNTAP32_NAME TUNTAP_APPNAME "32"
8661
#endif
8762
#endif
8863
#endif

tt32if.h

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,13 @@
55
/* (http://www.hercules-390.org/herclic.html) as modifications to */
66
/* Hercules. */
77

8-
// Copyright (C) 2013, Software Development Laboratories, "Fish" (David B. Trout)
8+
// Copyright (C) 2013-2015, Software Development Laboratories, "Fish" (David B. Trout)
99
/////////////////////////////////////////////////////////////////////////////////////////
1010
//
1111
// tt32if.h -- declarations for inquiring about network interfaces
1212
//
1313
/////////////////////////////////////////////////////////////////////////////////////////
1414
//
15-
// Change History:
16-
//
17-
// 02/21/07 3.3.0 Fish Created.
18-
// 02/21/07 3.3.0 Fish Tweaked for inclusion into CTCI-WIN and Hercules.
19-
//
20-
//////////////////////////////////////////////////////////////////////////////////////////
21-
//
2215
// http://www.musl-libc.org/
2316
// http://git.musl-libc.org/cgit/musl/plain/COPYRIGHT
2417
//
@@ -75,10 +68,6 @@ extern "C" {
7568

7669
//---------------------------------------------------------------------------------------
7770

78-
#ifndef IF_NAMESIZE
79-
#define IF_NAMESIZE 16
80-
#endif
81-
8271
struct if_nameindex
8372
{
8473
unsigned int if_index;
@@ -163,7 +152,7 @@ struct ifmap {
163152
#define IFHWADDRLEN 6
164153
#endif
165154
#ifndef IFNAMSIZ
166-
#define IFNAMSIZ IF_NAMESIZE
155+
#define IFNAMSIZ 16
167156
#endif
168157

169158
struct ifreq {

0 commit comments

Comments
 (0)