php-src/win32/inet.c

39 lines
1.4 KiB
C
Raw Normal View History

2015-05-21 01:05:57 +08:00
/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
2018-01-02 12:57:58 +08:00
| Copyright (c) 1997-2018 The PHP Group |
2015-05-21 01:05:57 +08:00
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_01.txt |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: Pierre Joye <pierre@php.net> |
+----------------------------------------------------------------------+
*/
#include "inet.h"
int inet_aton(const char *cp, struct in_addr *inp) {
inp->s_addr = inet_addr(cp);
if (inp->s_addr == INADDR_NONE) {
return 0;
}
return 1;
}
2015-05-21 00:51:19 +08:00
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
* vim600: sw=4 ts=4 fdm=marker
* vim<600: sw=4 ts=4
*/