Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
cf4c70d1
Commit
cf4c70d1
authored
Dec 27, 2001
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Portability fix for SCO
parent
e4fc0992
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
24 deletions
+25
-24
extra/resolveip.c
extra/resolveip.c
+25
-24
No files found.
extra/resolveip.c
View file @
cf4c70d1
/* Copyright (C) 2000 MySQL AB
& MySQL Finland AB & TCX DataKonsult AB
/* Copyright (C) 2000 MySQL AB
This
library is free software; you can redistribute it and/or
This
program is free software; you can redistribute it and/or modify
modify it under the terms of the GNU Library General Public
it under the terms of the GNU General Public License as published by
License as published by the Free Software Foundation; eithe
r
the Free Software Foundation; either version 2 of the License, o
r
version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
This
library
is distributed in the hope that it will be useful,
This
program
is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Library General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU Library General Public
You should have received a copy of the GNU General Public License
License along with this library; if not, write to the Free
along with this program; if not, write to the Free Software
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
MA 02111-1307, USA */
/* Resolves IP's to hostname and hostnames to IP's */
/* Resolves IP's to hostname and hostnames to IP's */
#define RESOLVE_VERSION "2.0"
#define RESOLVE_VERSION "2.0"
#include <global.h>
#include <
my_
global.h>
#include <m_ctype.h>
#include <m_ctype.h>
#include <my_net.h>
#include <my_sys.h>
#include <my_sys.h>
#ifndef SCO
#include <m_string.h>
#include <m_string.h>
#endif
#include <sys/types.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/socket.h>
#ifndef HAVE_BROKEN_NETINET_INCLUDES
#ifndef HAVE_BROKEN_NETINET_INCLUDES
...
@@ -34,10 +32,16 @@
...
@@ -34,10 +32,16 @@
#include <netdb.h>
#include <netdb.h>
#include <getopt.h>
#include <getopt.h>
#ifdef SCO
#undef h_errno
#define h_errno errno
#endif
#if !defined(_AIX) && !defined(HAVE_UNIXWARE7_THREADS) && !defined(HAVE_UNIXWARE7_POSIX) && !defined(h_errno)
#if !defined(_AIX) && !defined(HAVE_UNIXWARE7_THREADS) && !defined(HAVE_UNIXWARE7_POSIX) && !defined(h_errno)
extern
int
h_errno
;
extern
int
h_errno
;
#endif
#endif
static
int
silent
=
0
;
static
int
silent
=
0
;
static
struct
option
long_options
[]
=
static
struct
option
long_options
[]
=
...
@@ -54,7 +58,7 @@ static void print_version(void)
...
@@ -54,7 +58,7 @@ static void print_version(void)
{
{
printf
(
"%s Ver %s, for %s (%s)
\n
"
,
my_progname
,
RESOLVE_VERSION
,
printf
(
"%s Ver %s, for %s (%s)
\n
"
,
my_progname
,
RESOLVE_VERSION
,
SYSTEM_TYPE
,
MACHINE_TYPE
);
SYSTEM_TYPE
,
MACHINE_TYPE
);
}
}
static
void
usage
(
void
)
static
void
usage
(
void
)
...
@@ -140,7 +144,7 @@ int main(int argc, char **argv)
...
@@ -140,7 +144,7 @@ int main(int argc, char **argv)
puts
(
"Old-Bcast"
);
puts
(
"Old-Bcast"
);
continue
;
continue
;
}
}
hpaddr
=
gethostbyaddr
((
char
*
)
&
(
taddr
),
sizeof
(
struct
in_addr
),
AF_INET
);
hpaddr
=
gethostbyaddr
((
char
*
)
&
(
taddr
),
sizeof
(
struct
in_addr
),
AF_INET
);
if
(
hpaddr
)
if
(
hpaddr
)
{
{
...
@@ -202,6 +206,3 @@ int main(int argc, char **argv)
...
@@ -202,6 +206,3 @@ int main(int argc, char **argv)
}
}
exit
(
error
);
exit
(
error
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment