* Merge in cygwin-64bit-branch.
This commit is contained in:
@ -54,7 +54,7 @@ daemon (int nochdir, int noclose)
|
||||
break;
|
||||
default:
|
||||
/* This sleep avoids a race condition which kills the
|
||||
child process if parent is started by a NT/W2K service.
|
||||
child process if parent is started by a service process.
|
||||
FIXME: Is that still true? */
|
||||
Sleep (1000L);
|
||||
_exit (0);
|
||||
@ -112,7 +112,7 @@ openpty (int *amaster, int *aslave, char *name, const struct termios *termp,
|
||||
{
|
||||
grantpt (master);
|
||||
unlockpt (master);
|
||||
__ptsname (pts, cygheap->fdtab[master]->get_unit ());
|
||||
__ptsname (pts, cygheap->fdtab[master]->get_minor ());
|
||||
revoke (pts);
|
||||
if ((slave = open (pts, O_RDWR | O_NOCTTY)) >= 0)
|
||||
{
|
||||
|
@ -94,7 +94,7 @@ static int fts_ufslinks(FTS *, const FTSENT *);
|
||||
struct _fts_private {
|
||||
FTS ftsp_fts;
|
||||
struct statfs ftsp_statfs;
|
||||
__dev32_t ftsp_dev;
|
||||
dev_t ftsp_dev;
|
||||
int ftsp_linksreliable;
|
||||
};
|
||||
|
||||
@ -507,7 +507,7 @@ name: t = sp->fts_path + NAPPEND(p->fts_parent);
|
||||
/* ARGSUSED */
|
||||
int
|
||||
fts_set(sp, p, instr)
|
||||
FTS *sp;
|
||||
FTS *sp __attribute__ ((unused));
|
||||
FTSENT *p;
|
||||
int instr;
|
||||
{
|
||||
@ -758,7 +758,7 @@ fts_build(sp, type)
|
||||
|
||||
if ((p = fts_alloc(sp, dp->d_name, (int)dnamlen)) == NULL)
|
||||
goto mem1;
|
||||
if (dnamlen >= maxlen) { /* include space for NUL */
|
||||
if ((int) dnamlen >= maxlen) { /* include space for NUL */
|
||||
oldaddr = sp->fts_path;
|
||||
if (fts_palloc(sp, dnamlen + len + 1)) {
|
||||
/*
|
||||
@ -907,9 +907,9 @@ fts_stat(sp, p, follow)
|
||||
int follow;
|
||||
{
|
||||
FTSENT *t;
|
||||
__dev32_t dev;
|
||||
__ino64_t ino;
|
||||
struct __stat64 *sbp, sb;
|
||||
dev_t dev;
|
||||
ino_t ino;
|
||||
struct stat *sbp, sb;
|
||||
int saved_errno;
|
||||
|
||||
/* If user needs stat info, stat buffer already allocated. */
|
||||
@ -943,7 +943,7 @@ fts_stat(sp, p, follow)
|
||||
}
|
||||
} else if (lstat64(p->fts_accpath, sbp)) {
|
||||
p->fts_errno = errno;
|
||||
err: memset(sbp, 0, sizeof(struct __stat64));
|
||||
err: memset(sbp, 0, sizeof(struct stat));
|
||||
return (FTS_NS);
|
||||
}
|
||||
|
||||
@ -1041,7 +1041,7 @@ fts_alloc(sp, name, namelen)
|
||||
|
||||
struct ftsent_withstat {
|
||||
FTSENT ent;
|
||||
struct __stat64 statbuf;
|
||||
struct stat statbuf;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1177,7 +1177,7 @@ fts_safe_changedir(sp, p, fd, path)
|
||||
const char *path;
|
||||
{
|
||||
int ret, oerrno, newfd;
|
||||
struct __stat64 sb;
|
||||
struct stat sb;
|
||||
|
||||
newfd = fd;
|
||||
if (ISSET(FTS_NOCHDIR))
|
||||
|
@ -41,8 +41,8 @@ __FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/ftw.c,v 1.4 2004/08/24 13:0
|
||||
#include <limits.h>
|
||||
|
||||
int
|
||||
ftw(const char *path, int (*fn)(const char *, const struct __stat64 *, int),
|
||||
int nfds)
|
||||
ftw(const char *path, int (*fn)(const char *, const struct stat *, int),
|
||||
int nfds __attribute__ ((unused)))
|
||||
{
|
||||
char * const paths[2] = { (char *)path, NULL };
|
||||
FTSENT *cur;
|
||||
|
@ -62,7 +62,7 @@ cygwin_inet_network(cp)
|
||||
in_addr_t val, base, n;
|
||||
char c;
|
||||
in_addr_t parts[4], *pp = parts;
|
||||
int i, digit;
|
||||
unsigned int i, digit;
|
||||
|
||||
again:
|
||||
val = 0; base = 10; digit = 0;
|
||||
|
@ -37,7 +37,7 @@ details. */
|
||||
***********************************************************************/
|
||||
|
||||
#define PUTDOMAIN(d,p)\
|
||||
{int res = dn_comp(d, p, EndPtr - p, dnptrs, lastdnptr); p += res < 0 ? strlen(d) : res; }
|
||||
{int res = dn_comp(d, p, EndPtr - p, dnptrs, lastdnptr); p += res < 0 ? (int) strlen(d) : res; }
|
||||
|
||||
static u_char * write_record(unsigned char * ptr, PDNS_RECORD rr, unsigned char * EndPtr,
|
||||
unsigned char ** dnptrs, unsigned char ** lastdnptr, int debug)
|
||||
@ -187,7 +187,8 @@ static int cygwin_query(res_state statp, const char * DomName, int Class, int Ty
|
||||
{
|
||||
DNS_STATUS res;
|
||||
PDNS_RECORD pQueryResultsSet, rr;
|
||||
int section, len, counts[4] = {0, 0, 0, 0}, debug = statp->options & RES_DEBUG;
|
||||
DWORD section;
|
||||
int len, counts[4] = {0, 0, 0, 0}, debug = statp->options & RES_DEBUG;
|
||||
unsigned char * dnptrs[256], * ptr;
|
||||
|
||||
dnptrs[0] = AnsPtr;
|
||||
@ -309,7 +310,7 @@ static void get_registry_dns_items(PUNICODE_STRING in, res_state statp,
|
||||
size_t size = wcstombs (list, in->Buffer, in->Length);
|
||||
if (what == 0) { /* Get the addresses */
|
||||
char *ap, *srch;
|
||||
int numAddresses = 0;
|
||||
size_t numAddresses = 0;
|
||||
for (ap = list; ap < list + size && *ap; ap = srch) {
|
||||
/* The separation character can be 0, ' ', or ','. */
|
||||
for (srch = ap; *srch && (isdigit((unsigned) *srch) || *srch == '.' );
|
||||
@ -418,7 +419,7 @@ void get_dns_info(res_state statp)
|
||||
DWORD dwRetVal;
|
||||
IP_ADDR_STRING * pIPAddr;
|
||||
FIXED_INFO * pFixedInfo;
|
||||
int numAddresses = 0;
|
||||
size_t numAddresses = 0;
|
||||
|
||||
if (statp->use_os)
|
||||
{
|
||||
|
@ -177,9 +177,9 @@ static void get_resolv(res_state statp)
|
||||
if (!have_address
|
||||
&& !strncasecmp("nameserver", words[0], sizes[0])) {
|
||||
for ( j = 1; j < i ; j++) {
|
||||
unsigned int address;
|
||||
in_addr_t address;
|
||||
address = cygwin_inet_addr(words[j]);
|
||||
if (address == -1) {
|
||||
if (address == INADDR_NONE) {
|
||||
DPRINTF(debug, "invalid server \"%s\"\n", words[j]);
|
||||
}
|
||||
else if (ns >= MAXNS) {
|
||||
@ -295,7 +295,7 @@ int res_ninit(res_state statp)
|
||||
Mix the upper and lower bits as they are not used equally */
|
||||
i = getpid();
|
||||
statp->id = (ushort) (getppid() ^ (i << 8) ^ (i >> 8));
|
||||
for (i = 0; i < DIM(statp->dnsrch); i++) statp->dnsrch[i] = 0;
|
||||
for (i = 0; i < (int) DIM(statp->dnsrch); i++) statp->dnsrch[i] = 0;
|
||||
|
||||
/* resolv.conf (dns servers & search list)*/
|
||||
get_resolv(statp);
|
||||
@ -424,7 +424,7 @@ int res_nsend( res_state statp, const unsigned char * MsgPtr,
|
||||
int MsgLength, unsigned char * AnsPtr, int AnsLength)
|
||||
{
|
||||
/* Current server, shared by all tasks */
|
||||
volatile static unsigned int SServ = 0XFFFFFFFF;
|
||||
static volatile unsigned int SServ = 0XFFFFFFFF;
|
||||
int tcp;
|
||||
const int debug = statp->options & RES_DEBUG;
|
||||
|
||||
@ -459,7 +459,7 @@ int res_nsend( res_state statp, const unsigned char * MsgPtr,
|
||||
|
||||
/* Close the socket if it had been opened before a fork.
|
||||
Reuse of pid's cannot hurt */
|
||||
if ((statp->sockfd != -1) && (statp->mypid != getpid())) {
|
||||
if ((statp->sockfd != -1) && ((pid_t) statp->mypid != getpid())) {
|
||||
res_nclose(statp);
|
||||
}
|
||||
|
||||
@ -625,8 +625,10 @@ int res_send( const unsigned char * MsgPtr, int MsgLength,
|
||||
*****************************************************************/
|
||||
int res_nmkquery (res_state statp,
|
||||
int op, const char * dnameptr, int qclass, int qtype,
|
||||
const unsigned char * dataptr, int datalen,
|
||||
const unsigned char * newrr, unsigned char * buf, int buflen)
|
||||
const unsigned char * dataptr __attribute__ ((unused)),
|
||||
int datalen __attribute__ ((unused)),
|
||||
const unsigned char * newrr __attribute__ ((unused)),
|
||||
unsigned char * buf, int buflen)
|
||||
{
|
||||
int i, len;
|
||||
const char * ptr;
|
||||
@ -722,7 +724,7 @@ int res_nquerydomain( res_state statp, const char * Name, const char * DomName,
|
||||
int Class, int Type, unsigned char * AnsPtr, int AnsLength)
|
||||
{
|
||||
char fqdn[MAXDNAME], *ptr;
|
||||
int nlen;
|
||||
size_t nlen;
|
||||
|
||||
if (!DomName)
|
||||
ptr = (char *) Name;
|
||||
|
@ -41,8 +41,8 @@ __FBSDID("$FreeBSD: /repoman/r/ncvs/src/lib/libc/gen/nftw.c,v 1.1.2.1 2004/08/29
|
||||
#include <limits.h>
|
||||
|
||||
int
|
||||
nftw(const char *path, int (*fn)(const char *, const struct __stat64 *, int,
|
||||
struct FTW *), int nfds, int ftwflags)
|
||||
nftw(const char *path, int (*fn)(const char *, const struct stat *, int,
|
||||
struct FTW *), int nfds __attribute__ ((unused)), int ftwflags)
|
||||
{
|
||||
char * const paths[2] = { (char *)path, NULL };
|
||||
struct FTW ftw;
|
||||
|
@ -103,7 +103,7 @@ extern "C" {
|
||||
int cygwin_rresvport_af(int *alport, int family);
|
||||
int cygwin_select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
||||
int cygwin_socket (int, int, int);
|
||||
int seteuid32 (__uid32_t);
|
||||
int seteuid32 (uid_t);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -421,7 +421,7 @@ iruserok_sa(const void *ra, int rlen, int superuser, const char *ruser,
|
||||
const char *luser)
|
||||
{
|
||||
const char *cp;
|
||||
struct __stat64 sbuf;
|
||||
struct stat sbuf;
|
||||
struct passwd *pwd;
|
||||
FILE *hostf;
|
||||
uid_t uid;
|
||||
|
@ -155,7 +155,7 @@ ruserpass(const char *host, char **aname, char **apass, char **aacct)
|
||||
char myname[INTERNET_MAX_HOST_NAME_LENGTH + 1];
|
||||
const char *mydomain;
|
||||
int t, i, c, usedefault = 0;
|
||||
struct __stat64 stb;
|
||||
struct stat stb;
|
||||
|
||||
hdir = getenv("HOME");
|
||||
if (hdir == NULL)
|
||||
|
Reference in New Issue
Block a user