Skip to content
Snippets Groups Projects
Commit 0bbdf3f3 authored by Sebastien Ponce's avatar Sebastien Ponce Committed by Steven Murray
Browse files

Got rid of useless CONST and CONSTLL macros

Note that this change is a noop, as the code after compiler preprocessing does not change. This was actually double checked manually.
parent c98f2d7c
Branches
Tags
No related merge requests found
......@@ -49,7 +49,7 @@
/* Internal prototypes */
/* =================== */
static char * _Cgetopt_progname (char *);
int _Cgetopt_internal (int, char * CONST *, CONST char *);
int _Cgetopt_internal (int, char * const *, const char *);
static char **C__place ();
static int my_place = -1; /* If Cglobals_get error in order not to crash */
#define place (*C__place())
......@@ -74,8 +74,8 @@ static char * _Cgetopt_progname(nargv0)
int
_Cgetopt_internal(nargc, nargv, ostr)
int nargc;
char * CONST *nargv;
CONST char *ostr;
char * const *nargv;
const char *ostr;
{
char *oli; /* option letter list index */
......@@ -154,8 +154,8 @@ _Cgetopt_internal(nargc, nargv, ostr)
int
Cgetopt(nargc, nargv, ostr)
int nargc;
char * CONST *nargv;
CONST char *ostr;
char * const *nargv;
const char *ostr;
{
int retval;
......
......@@ -20,7 +20,7 @@
#include <osdep.h>
struct group *Cgetgrnam(name)
CONST char *name;
const char *name;
{
#if (!defined(_REENTRANT) && !defined(_THREAD_SAFE))
/*
......
......@@ -19,7 +19,7 @@
#include <Cnetdb.h>
struct hostent *Cgethostbyname(name)
CONST char *name;
const char *name;
{
#if (!defined(_REENTRANT) && !defined(_THREAD_SAFE)) || defined(__APPLE__)
/*
......@@ -58,7 +58,7 @@ CONST char *name;
}
struct hostent *Cgethostbyaddr(addr,len,type)
CONST void *addr;
const void *addr;
size_t len;
int type;
{
......@@ -99,8 +99,8 @@ int type;
}
struct servent *Cgetservbyname(name,proto)
CONST char *name;
CONST char *proto;
const char *name;
const char *proto;
{
#if (!defined(_REENTRANT) && !defined(_THREAD_SAFE)) || defined(__APPLE__)
/*
......
......@@ -14,9 +14,9 @@
#include <osdep.h>
#include <netdb.h>
EXTERN_C struct hostent *Cgethostbyname (CONST char *);
EXTERN_C struct hostent *Cgethostbyaddr (CONST void *, size_t, int);
EXTERN_C struct servent *Cgetservbyname (CONST char *, CONST char *);
EXTERN_C struct hostent *Cgethostbyname (const char *);
EXTERN_C struct hostent *Cgethostbyaddr (const void *, size_t, int);
EXTERN_C struct servent *Cgetservbyname (const char *, const char *);
#define CLOSE(x) ::close(x) /* Actual close system call */
#define IOCTL(x,y,z) ::ioctl(x,y,z) /* Actual ioctl system call */
......
......@@ -81,17 +81,6 @@ typedef U_HYPER TIME_T;
#define NETERROR perror
#define OSERROR perror
#if (defined(__STDC__) || defined(__cplusplus))
/* On Win32, compiler is STDC compliant but the */
/* __STDC__ definition itself is not a default. */
#define CONST const
#else
#define CONST
#endif
/* Macros for 64-bits constants definition */
#define CONSTLL(a) (a##LL)
/* Macros for externalization (UNIX) (J.-D.Durand) */
#ifdef EXTERN_C
#undef EXTERN_C
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment