2 * collectd - src/collectd_windows.c
\r
3 * Copyright (C) 2017 Google LLC
\r
5 * Permission is hereby granted, free of charge, to any person obtaining a
\r
6 * copy of this software and associated documentation files (the "Software"),
\r
7 * to deal in the Software without restriction, including without limitation
\r
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
\r
9 * and/or sell copies of the Software, and to permit persons to whom the
\r
10 * Software is furnished to do so, subject to the following conditions:
\r
12 * The above copyright notice and this permission notice shall be included in
\r
13 * all copies or substantial portions of the Software.
\r
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
\r
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
\r
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
\r
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
\r
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
\r
21 * DEALINGS IN THE SOFTWARE.
\r
27 #include <windows.h>
\r
29 int main(int argc, char **argv) {
\r
31 WORD wVersionRequested = MAKEWORD(2, 2);
\r
32 int err = WSAStartup(wVersionRequested, &wsaData);
\r
34 ERROR("WSAStartup failed with error: %d\n", err);
\r
38 struct cmdline_config config = init_config(argc, argv);
\r
39 return run_loop(config.test_readall);
\r