diff options
author | Danny Smith <dannysmith@users.sourceforge.net> | 2002-01-27 23:20:56 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@users.sourceforge.net> | 2002-01-27 23:20:56 +0000 |
commit | a4f2440619197dfda56aa119029a00180076cec0 (patch) | |
tree | d22353b80f1181406f741672a302f7b72c2d1735 | |
parent | 88a820dbcc75af61e495d87ffc047085e218515e (diff) | |
download | newlib-a4f2440619197dfda56aa119029a00180076cec0.zip newlib-a4f2440619197dfda56aa119029a00180076cec0.tar.gz newlib-a4f2440619197dfda56aa119029a00180076cec0.tar.bz2 |
* lib/test.c: Include wsnetbsd.h.
* include/wsnetbs.h: New file.
-rw-r--r-- | winsup/w32api/ChangeLog | 8 | ||||
-rw-r--r-- | winsup/w32api/include/wsnetbs.h | 32 | ||||
-rw-r--r-- | winsup/w32api/lib/test.c | 1 |
3 files changed, 41 insertions, 0 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index 407e5e8..d8f61d8 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,3 +1,11 @@ +2002-01-28 Danny Smith <dannysmith@users.sourceforge.net> + + * lib/test.c: Include wsnetbsd.h. + +2002-01-28 Kai Henningsen <kai-henningsen@users.sourceforge.net> + + * include/wsnetbs.h: New file. + 2002-01-25 Earnie Boyd <earnie@users.sf.net> * include/winnt.h: Remove merge conflict. diff --git a/winsup/w32api/include/wsnetbs.h b/winsup/w32api/include/wsnetbs.h new file mode 100644 index 0000000..84b2837 --- /dev/null +++ b/winsup/w32api/include/wsnetbs.h @@ -0,0 +1,32 @@ +#ifndef _WSNETBS_H +#define _WSNETBS_H + +#define NETBIOS_NAME_LENGTH 16 +#define NETBIOS_UNIQUE_NAME 0 +#define NETBIOS_GROUP_NAME 1 +#define NETBIOS_TYPE_QUICK_UNIQUE 2 +#define NETBIOS_TYPE_QUICK_GROUP 3 + +#ifndef RC_INVOKED +typedef struct sockaddr_nb { + short snb_family; + u_short snb_type; + char snb_name[NETBIOS_NAME_LENGTH]; +} SOCKADDR_NB, *PSOCKADDR_NB, *LPSOCKADDR_NB; +#define SET_NETBIOS_SOCKADDR(_snb,_type,_name,_port) \ +{ \ + register int _i; \ + register char *_n = (_name); \ + register PSOCKADDR_NB _s = (_snb); \ + _s->snb_family = AF_NETBIOS; \ + _s->snb_type = (_type); \ + for (_i=0; _n[_i] != '\0' && _i<NETBIOS_NAME_LENGTH-1; _i++) { \ + _s->snb_name[_i] = _n[_i]; \ + } \ + for (; _i<NETBIOS_NAME_LENGTH-1; _i++) { \ + _s->snb_name[_i] = ' '; \ + } \ + _s->snb_name[NETBIOS_NAME_LENGTH-1] = (_port); \ +} +#endif /* RC_INVOKED */ +#endif diff --git a/winsup/w32api/lib/test.c b/winsup/w32api/lib/test.c index 2d9284c..1a30b8d 100644 --- a/winsup/w32api/lib/test.c +++ b/winsup/w32api/lib/test.c @@ -55,6 +55,7 @@ #include <winresrc.h> #include <winsock.h> #include <ws2tcpip.h> +#include <wsnetbs.h> #include <setupapi.h> #include <aclapi.h> |