/*
- * $Id: psorder.c,v 1.5 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: psorder.c,v 1.5.16.1 2008-11-25 15:16:31 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
make temporary file
*/
- (void *)strncpy( tfile, template, MAXNAMLEN );
+ strncpy( tfile, template, MAXNAMLEN );
if (( *tfd = mkstemp( tfile )) == -1 ) {
fprintf( stderr, "can't create temporary file %s\n", tfile );
filecleanup( -1, -1, "" );
/*
- * $Id: afp_asp.c,v 1.18.6.6.2.1 2005-09-27 10:40:40 didg Exp $
+ * $Id: afp_asp.c,v 1.18.6.6.2.2 2008-11-25 15:16:31 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
static AFPObj *child;
-static __inline__ void afp_authprint_remove(AFPObj *);
+static void afp_authprint_remove(AFPObj *);
-static __inline__ void afp_asp_close(AFPObj *obj)
+static void afp_asp_close(AFPObj *obj)
{
ASP asp = obj->handle;
}
/* removes the authprint trailing when appropriate */
-static __inline__ void afp_authprint_remove(AFPObj *obj)
+static void afp_authprint_remove(AFPObj *obj)
{
ASP asp = obj->handle;
char addr_filename[256];
/*
- * $Id: afp_dsi.c,v 1.27.2.3.2.4.2.2 2005-09-27 10:40:40 didg Exp $
+ * $Id: afp_dsi.c,v 1.27.2.3.2.4.2.3 2008-11-25 15:16:32 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* Copyright (c) 1990,1993 Regents of The University of Michigan.
} child;
-static __inline__ void afp_dsi_close(AFPObj *obj)
+static void afp_dsi_close(AFPObj *obj)
{
DSI *dsi = obj->handle;
/*
- * $Id: appl.c,v 1.12.2.1.2.2.2.2 2005-09-27 10:40:41 didg Exp $
+ * $Id: appl.c,v 1.12.2.1.2.2.2.3 2008-11-25 15:16:32 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
static struct savedt sa = { { 0, 0, 0, 0 }, -1, 0, 0};
-static __inline__ int pathcmp( p, plen, q, qlen )
+static int pathcmp( p, plen, q, qlen )
char *p;
int plen;
char *q;
/*
- * $Id: directory.c,v 1.71.2.4.2.15.2.9 2006-09-19 02:24:04 didg Exp $
+ * $Id: directory.c,v 1.71.2.4.2.15.2.10 2008-11-25 15:16:32 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
/* remove the node from the tree. this is just like insertion, but
* different. actually, it has to worry about a bunch of things that
* insertion doesn't care about. */
-static void dir_remove( vol, dir )
-struct vol *vol;
-struct dir *dir;
+static void dir_remove( const struct vol *vol _U_, struct dir *dir)
{
#ifdef REMOVE_NODES
struct ofork *of, *last;
0,
"", /* mac name */
".", /* unix name */
+ NULL,
0, /* stat is not set */
- 0, /* */
+ 0 /* errno */
};
/* ------------------ */
#define DOT_APPLEDOUBLE_LEN 13
/* delete an empty directory */
-int deletecurdir( vol, path, pathlen )
+int deletecurdir( vol, path )
const struct vol *vol;
char *path;
-int pathlen;
{
struct dirent *de;
struct stat st;
/*
- * $Id: directory.h,v 1.13.2.4.2.2 2004-05-10 18:40:32 didg Exp $
+ * $Id: directory.h,v 1.13.2.4.2.2.2.1 2008-11-25 15:16:32 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
};
#ifndef ATACC
-static __inline__ int path_isadir(struct path *o_path)
+static inline int path_isadir(struct path *o_path)
{
return o_path->d_dir != NULL;
#if 0
extern struct dir *dirinsert __P((struct vol *, struct dir *));
extern int movecwd __P((const struct vol *, struct dir *));
-extern int deletecurdir __P((const struct vol *, char *, int));
+extern int deletecurdir __P((const struct vol *, char *));
extern struct path *cname __P((const struct vol *, struct dir *,
char **));
extern mode_t mtoumode __P((struct maccess *));
/*
- * $Id: file.c,v 1.92.2.2.2.31.2.21 2007-05-14 18:25:27 didg Exp $
+ * $Id: file.c,v 1.92.2.2.2.31.2.22 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
}
/* ----------------------- */
-static __inline__ int copy_all(const int dfd, const void *buf,
+static int copy_all(const int dfd, const void *buf,
size_t buflen)
{
ssize_t cc;
/*
- * $Id: filedir.c,v 1.45.2.2.2.14.2.4 2005-09-27 10:40:41 didg Exp $
+ * $Id: filedir.c,v 1.45.2.2.2.14.2.5 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
rc = AFPERR_ACCESS;
}
else {
- rc = deletecurdir( vol, obj->oldtmp, AFPOBJ_TMPSIZ);
+ rc = deletecurdir( vol, obj->oldtmp);
}
} else if (of_findname(s_path)) {
rc = AFPERR_BUSY;
/*
- * $Id: fork.c,v 1.51.2.2.2.10.2.5 2005-09-28 09:38:56 didg Exp $
+ * $Id: fork.c,v 1.51.2.2.2.10.2.6 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return 0;
}
-static __inline__ int sum_neg(int is64, off_t offset, off_t reqcount)
+static int sum_neg(int is64, off_t offset, off_t reqcount)
{
if (is_neg(is64, offset +reqcount) )
return 1;
#undef UNLOCKBIT
/* --------------------------- */
-static __inline__ int crlf( of )
+static int crlf( of )
struct ofork *of;
{
struct extmap *em;
}
-static __inline__ ssize_t read_file(struct ofork *ofork, int eid,
+static ssize_t read_file(struct ofork *ofork, int eid,
off_t offset, u_char nlmask,
u_char nlchar, char *rbuf,
int *rbuflen, const int xlate)
}
-static __inline__ ssize_t write_file(struct ofork *ofork, int eid,
+static ssize_t write_file(struct ofork *ofork, int eid,
off_t offset, char *rbuf,
size_t rbuflen, const int xlate)
{
/*
- * $Id: fork.h,v 1.8.6.2.2.2 2005-09-28 09:38:57 didg Exp $
+ * $Id: fork.h,v 1.8.6.2.2.3 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
};
struct ofork {
+ struct file_key key;
struct adouble *of_ad;
struct vol *of_vol;
struct dir *of_dir;
u_int16_t of_refnum;
int of_flags;
- struct file_key key;
struct ofork **prevp, *next;
struct ofork *of_d_prev, *of_d_next;
};
/*
- * $Id: globals.h,v 1.18.2.2.2.5 2004-06-15 00:35:06 bfernhomberg Exp $
+ * $Id: globals.h,v 1.18.2.2.2.5.2.1 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#include <atalk/unicode.h>
#include <atalk/uam.h>
-/* test for inline */
-#ifndef __inline__
-#define __inline__
-#endif
-
#define MACFILELEN 31
#define OPTION_DEBUG (1 << 0)
/*
- * $Id: ofork.c,v 1.20.6.6.2.6 2008-08-16 20:40:55 didg Exp $
+ * $Id: ofork.c,v 1.20.6.6.2.7 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1996 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
/* OR some of each character for the hash*/
-static __inline__ unsigned long hashfn(const struct file_key *key)
+static unsigned long hashfn(const struct file_key *key)
{
#if 0
unsigned long i = 0;
return key->inode & (OFORK_HASHSIZE - 1);
}
-static __inline__ void of_hash(struct ofork *of)
+static void of_hash(struct ofork *of)
{
struct ofork **table;
of->prevp = table;
}
-static __inline__ void of_unhash(struct ofork *of)
+static void of_unhash(struct ofork *of)
{
if (of->prevp) {
if (of->next)
/*
- * $Id: unix.c,v 1.43.2.1.2.10.2.3 2005-09-27 10:40:41 didg Exp $
+ * $Id: unix.c,v 1.43.2.1.2.10.2.4 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
return( AFP_OK );
}
-static __inline__ int utombits( bits )
+static int utombits( bits )
mode_t bits;
{
int mbits;
return( 0 );
}
-static __inline__ mode_t mtoubits( bits )
+static mode_t mtoubits( bits )
u_char bits;
{
mode_t mode;
/*
- * $Id: volume.c,v 1.51.2.7.2.33.2.14 2007-04-11 00:21:23 didg Exp $
+ * $Id: volume.c,v 1.51.2.7.2.33.2.15 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
static void handle_special_folders (const struct vol *);
static int savevoloptions (const struct vol *);
-static __inline__ void volfree(struct vol_option *options,
+static void volfree(struct vol_option *options,
const struct vol_option *save)
{
int i;
/*
- * $Id: lp.c,v 1.14.8.4.2.3 2008-11-14 10:04:52 didg Exp $
+ * $Id: lp.c,v 1.14.8.4.2.4 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1990,1994 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
}
#ifndef HAVE_CUPS
-int lp_disconn_unix( fd )
+int lp_disconn_unix( int fd )
{
return( close( fd ));
}
/*
- * $Id: uams_krb4.c,v 1.6.10.1.2.1 2008-11-14 10:04:52 didg Exp $
+ * $Id: uams_krb4.c,v 1.6.10.1.2.2 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
#ifdef KRB
-static __inline__ void lcase( p )
+static void lcase( p )
char *p;
{
for (; *p; p++ ) {
return;
}
-static __inline__ void ucase( p )
+static void ucase( p )
char *p;
{
for (; *p; p++ ) {
/*
- * $Id: uams_randnum.c,v 1.12.6.4.2.1 2005-09-27 10:40:41 didg Exp $
+ * $Id: uams_randnum.c,v 1.12.6.4.2.2 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#include <crack.h>
#endif /* USE_CRACKLIB */
-#ifndef __inline__
-#define __inline__
-#endif /* __inline__ */
-
#define PASSWDLEN 8
static C_Block seskey;
/* handle ~/.passwd. courtesy of shirsch@ibm.net. */
-static __inline__ int home_passwd(const struct passwd *pwd,
+static int home_passwd(const struct passwd *pwd,
const char *path, const int pathlen _U_,
unsigned char *passwd, const int len,
const int set)
/*
- * $Id: adouble.h,v 1.21.6.20.2.7 2006-09-29 09:27:54 didg Exp $
+ * $Id: adouble.h,v 1.21.6.20.2.8 2008-11-25 15:16:33 didg Exp $
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
char ad_filler[ 16 ];
struct ad_entry ad_eid[ ADEID_MAX ];
struct ad_fd ad_df, ad_hf;
- int ad_flags, ad_inited;
+ int ad_flags;
+ unsigned ad_inited;
int ad_options;
int ad_refcount; /* used in afpd/ofork.c */
off_t ad_rlen; /* ressource fork len with AFP 3.0
* remove X mode and extend header to RW if R or W (W if R for locking),
*/
#ifndef ATACC
-#ifndef __inline__
-#define __inline__
-#endif
-static __inline__ mode_t ad_hf_mode (mode_t mode)
+static inline mode_t ad_hf_mode (mode_t mode)
{
mode &= ~(S_IXUSR | S_IXGRP | S_IXOTH);
/* fnctl lock need write access */
#ifndef _ATALK_LIST_H
#define _ATALK_LIST_H
-/* test for inline */
-#ifndef __inline__
-#define __inline__
-#endif
-
/*
* Simple doubly linked list implementation.
*
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
-static __inline__ void __list_add(struct list_head * new,
+static inline void __list_add(struct list_head * new,
struct list_head * prev,
struct list_head * next)
{
* Insert a new entry after the specified head.
* This is good for implementing stacks.
*/
-static __inline__ void list_add(struct list_head *new, struct list_head *head)
+static inline void list_add(struct list_head *new, struct list_head *head)
{
__list_add(new, head, head->next);
}
* Insert a new entry before the specified head.
* This is useful for implementing queues.
*/
-static __inline__ void list_add_tail(struct list_head *new, struct list_head *head)
+static inline void list_add_tail(struct list_head *new, struct list_head *head)
{
__list_add(new, head->prev, head);
}
* This is only for internal list manipulation where we know
* the prev/next entries already!
*/
-static __inline__ void __list_del(struct list_head * prev,
+static inline void __list_del(struct list_head * prev,
struct list_head * next)
{
next->prev = prev;
* @entry: the element to delete from the list.
* Note: list_empty on entry does not return true after this, the entry is in an undefined state.
*/
-static __inline__ void list_del(struct list_head *entry)
+static inline void list_del(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
}
* list_del_init - deletes entry from list and reinitialize it.
* @entry: the element to delete from the list.
*/
-static __inline__ void list_del_init(struct list_head *entry)
+static inline void list_del_init(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
ATALK_INIT_LIST_HEAD(entry);
* list_empty - tests whether a list is empty
* @head: the list to test.
*/
-static __inline__ int list_empty(struct list_head *head)
+static inline int list_empty(struct list_head *head)
{
return head->next == head;
}
* @list: the new list to add.
* @head: the place to add it in the first list.
*/
-static __inline__ void list_splice(struct list_head *list, struct list_head *head)
+static inline void list_splice(struct list_head *list, struct list_head *head)
{
struct list_head *first = list->next;
/*
- * $Id: ad_lock.c,v 1.11.6.4.2.1 2004-12-07 03:24:38 didg Exp $
+ * $Id: ad_lock.c,v 1.11.6.4.2.2 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1998,1999 Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT for more information.
#define ARRAY_FREE_DELTA 100
/* remove a lock and compact space if necessary */
-static __inline__ void adf_freelock(struct ad_fd *ad, const int i)
+static void adf_freelock(struct ad_fd *ad, const int i)
{
adf_lock_t *lock = ad->adf_lock + i;
* i converted to using arrays of locks. everytime a lock
* gets removed, we shift all of the locks down.
*/
-static __inline__ void adf_unlock(struct ad_fd *ad, const int user)
+static void adf_unlock(struct ad_fd *ad, const int user)
{
adf_lock_t *lock = ad->adf_lock;
int i;
/* relock any byte lock that overlaps off/len. unlock everything
* else. */
-static __inline__ void adf_relockrange(struct ad_fd *ad, int fd,
+static void adf_relockrange(struct ad_fd *ad, int fd,
const off_t off, const off_t len)
{
adf_lock_t *lock = ad->adf_lock;
/* find a byte lock that overlaps off/len for a particular user */
-static __inline__ int adf_findlock(struct ad_fd *ad,
+static int adf_findlock(struct ad_fd *ad,
const int user, const int type,
const off_t off,
const off_t len)
/* search other user lock lists */
-static __inline__ int adf_findxlock(struct ad_fd *ad,
+static int adf_findxlock(struct ad_fd *ad,
const int user, const int type,
const off_t off,
const off_t len)
/*
- * $Id: ad_mmap.c,v 1.4.8.1 2004-02-20 19:57:14 didg Exp $
+ * $Id: ad_mmap.c,v 1.4.8.1.2.1 2008-11-25 15:16:33 didg Exp $
*
* ad_mmap provides interfaces to memory mapped files. as this is the
* case, we don't have to deal w/ temporary buffers such as
#include "ad_private.h"
-static __inline__ void *ad_mmap(const size_t length, const int prot,
+static void *ad_mmap(const size_t length, const int prot,
const int flags, const int fd,
const off_t offset)
{
/*
- * $Id: ad_open.c,v 1.30.6.18.2.7 2006-09-29 09:27:54 didg Exp $
+ * $Id: ad_open.c,v 1.30.6.18.2.8 2008-11-25 15:16:33 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* ._name
*/
char *
-ad_path_osx( path, adflags )
- const char *path;
- int adflags;
+ad_path_osx( const char *path, int adflags _U_)
{
static char pathbuf[ MAXPATHLEN + 1];
char c, *slash, buf[MAXPATHLEN + 1];
#ifdef EMULATE_SUIDDIR
uid_t id;
- if (default_uid != -1) {
+ if (default_uid != (uid_t)-1) {
/* we are root (admin) */
id = (default_uid)?default_uid:stbuf->st_uid;
ret = chown( path, id, stbuf->st_gid );
/*
- * $Id: ad_private.h,v 1.5 2003-01-31 11:26:36 didg Exp $
+ * $Id: ad_private.h,v 1.5.8.1 2008-11-25 15:16:34 didg Exp $
*/
#ifndef LIBATALK_ADOUBLE_AD_PRIVATE_H
#define MAP_FAILED ((void *) -1)
#endif /* ! MAP_FAILED */
-#ifndef __inline__
-#define __inline__
-#endif /* ! __inline__ */
-
/* this is so that we can keep lists of fds referencing the same file
* around. that way, we can honor locks created by the same process
* with the same file. */
/*
- * $Id: ad_sendfile.c,v 1.6.6.2 2004-02-20 19:57:15 didg Exp $
+ * $Id: ad_sendfile.c,v 1.6.6.2.2.1 2008-11-25 15:16:34 didg Exp $
*
* Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
* All rights reserved. See COPYRIGHT.
#endif
/* ------------------------------- */
-static __inline__ int ad_sendfile_init(const struct adouble *ad,
+static int ad_sendfile_init(const struct adouble *ad,
const int eid, off_t *off,
const int end)
{
/*
- * $Id: cnid_cdb_add.c,v 1.1.4.6.2.2 2005-09-27 10:40:41 didg Exp $
+ * $Id: cnid_cdb_add.c,v 1.1.4.6.2.3 2008-11-25 15:16:34 didg Exp $
*
* Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
#ifdef CNID_BACKEND_CDB
#include "cnid_cdb_private.h"
+extern int cnid_cdb_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
+ const cnid_t did, char *name, const size_t len);
+
+
#define tid NULL
-#ifdef ATACC
static void make_devino_data(unsigned char *buf, dev_t dev, ino_t ino)
{
buf[CNID_DEV_LEN - 1] = dev; dev >>= 8;
return start;
}
-#endif
-
-extern int cnid_cdb_update(struct _cnid_db *cdb, const cnid_t id, const struct stat *st,
- const cnid_t did, char *name, const size_t len);
/* --------------- */
int db_stamp(void *buffer, size_t size)
/*
- * $Id: cnid_cdb_private.h,v 1.1.4.7.2.1 2005-09-27 10:40:41 didg Exp $
+ * $Id: cnid_cdb_private.h,v 1.1.4.7.2.2 2008-11-25 15:16:34 didg Exp $
*/
#ifndef LIBATALK_CDB_PRIVATE_H
* name namelen = strlen(name) + 1
*/
-#ifndef __inline__
-#define __inline__
-#endif /* __inline__ */
-
/* construct db_cnid data. NOTE: this is not re-entrant. */
-#ifndef ATACC
-static void make_devino_data(unsigned char *buf, dev_t dev, ino_t ino)
-{
- buf[CNID_DEV_LEN - 1] = dev; dev >>= 8;
- buf[CNID_DEV_LEN - 2] = dev; dev >>= 8;
- buf[CNID_DEV_LEN - 3] = dev; dev >>= 8;
- buf[CNID_DEV_LEN - 4] = dev; dev >>= 8;
- buf[CNID_DEV_LEN - 5] = dev; dev >>= 8;
- buf[CNID_DEV_LEN - 6] = dev; dev >>= 8;
- buf[CNID_DEV_LEN - 7] = dev; dev >>= 8;
- buf[CNID_DEV_LEN - 8] = dev;
-
- buf[CNID_DEV_LEN + CNID_INO_LEN - 1] = ino; ino >>= 8;
- buf[CNID_DEV_LEN + CNID_INO_LEN - 2] = ino; ino >>= 8;
- buf[CNID_DEV_LEN + CNID_INO_LEN - 3] = ino; ino >>= 8;
- buf[CNID_DEV_LEN + CNID_INO_LEN - 4] = ino; ino >>= 8;
- buf[CNID_DEV_LEN + CNID_INO_LEN - 5] = ino; ino >>= 8;
- buf[CNID_DEV_LEN + CNID_INO_LEN - 6] = ino; ino >>= 8;
- buf[CNID_DEV_LEN + CNID_INO_LEN - 7] = ino; ino >>= 8;
- buf[CNID_DEV_LEN + CNID_INO_LEN - 8] = ino;
-}
-
-static __inline__ unsigned char *make_cnid_data(const struct stat *st,
- const cnid_t did,
- const char *name, const size_t len)
-{
- static unsigned char start[CNID_HEADER_LEN + MAXPATHLEN + 1];
- unsigned char *buf = start +CNID_LEN;
- u_int32_t i;
-
- if (len > MAXPATHLEN)
- return NULL;
-
- make_devino_data(buf, st->st_dev, st->st_ino);
- buf += CNID_DEVINO_LEN;
-
- i = S_ISDIR(st->st_mode)?1:0;
- i = htonl(i);
- memcpy(buf, &i, sizeof(i));
- buf += sizeof(i);
-
- /* did is already in network byte order */
- memcpy(buf, &did, sizeof(did));
- buf += sizeof(did);
-
- memcpy(buf, name, len);
- *(buf + len) = '\0';
-
- return start;
-}
-#else
extern unsigned char *make_cnid_data __P((const struct stat *,const cnid_t ,
const char *, const size_t ));
-#endif
#endif /* atalk/cnid/cnid_private.h */
/*
- * $Id: cnid.c,v 1.1.4.11.2.3 2005-09-27 10:40:41 didg Exp $
+ * $Id: cnid.c,v 1.1.4.11.2.4 2008-11-25 15:16:34 didg Exp $
*
* Copyright (c) 2003 the Netatalk Team
* Copyright (c) 2003 Rafal Lewczuk <rlewczuk@pronet.pl>
struct _cnid_db *db;
cnid_module *mod = NULL;
struct list_head *ptr;
- uid_t uid; /* uninitialized, OK 310105 */
- gid_t gid;
+ uid_t uid = -1;
+ gid_t gid = -1;
list_for_each(ptr, &modules) {
if (0 == strcmp(list_entry(ptr, cnid_module, db_list)->name, type)) {
#include <netatalk/endian.h>
#include <atalk/cnid.h>
-static __inline__ int db3_txn_abort(DB_TXN *db_txn)
+static int db3_txn_abort(DB_TXN *db_txn)
{
int ret;
#if DB_VERSION_MAJOR >= 4
}
/* -------------------- */
-static __inline__ int db3_txn_begin(DB_ENV *db_env, DB_TXN *parent, DB_TXN **db_txn, u_int32_t flags)
+static int db3_txn_begin(DB_ENV *db_env, DB_TXN *parent, DB_TXN **db_txn, u_int32_t flags)
{
int ret;
#if DB_VERSION_MAJOR >= 4
}
/* -------------------- */
-static __inline__ int db3_txn_commit(DB_TXN *db_txn, u_int32_t flags)
+static int db3_txn_commit(DB_TXN *db_txn, u_int32_t flags)
{
int ret;
#if DB_VERSION_MAJOR >= 4
/*
- * $Id: cnid_db3_open.c,v 1.1.4.4 2004-03-02 13:30:29 bfernhomberg Exp $
+ * $Id: cnid_db3_open.c,v 1.1.4.4.2.1 2008-11-25 15:16:34 didg Exp $
*
* Copyright (c) 1999. Adrian Sun (asun@zoology.washington.edu)
* All Rights Reserved. See COPYRIGHT.
/* --------------- */
/* the first compare that's always done. */
-static __inline__ int compare_did(const DBT * a, const DBT * b)
+static int compare_did(const DBT * a, const DBT * b)
{
u_int32_t dida, didb;
/*
- * $Id: cnid_db3_private.h,v 1.1.4.3.2.1 2005-09-27 10:40:41 didg Exp $
+ * $Id: cnid_db3_private.h,v 1.1.4.3.2.2 2008-11-25 15:16:35 didg Exp $
*/
#ifndef LIBATALK_CNID_PRIVATE_H
* name namelen = strlen(name) + 1
*/
-#ifndef __inline__
-#define __inline__
-#endif /* __inline__ */
-
/* construct db_cnid data. NOTE: this is not re-entrant. */
-static __inline__ unsigned char *make_cnid_data(const struct stat *st,
+static inline unsigned char *make_cnid_data(const struct stat *st,
const cnid_t did,
const char *name, const size_t len)
{
extern cnid_t cnid_tdb_nextid __P((struct _cnid_db *));
/* construct db_cnid data. NOTE: this is not re-entrant. */
-static __inline__ char *make_tdb_data(const struct stat *st,
+static inline char *make_tdb_data(const struct stat *st,
const cnid_t did,
const char *name, const size_t len)
{
/*
- * $Id: server_child.c,v 1.7.4.1.2.4.2.1 2005-03-31 00:25:55 didg Exp $
+ * $Id: server_child.c,v 1.7.4.1.2.4.2.2 2008-11-25 15:16:35 didg Exp $
*
* Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu)
* All rights reserved. See COPYRIGHT.
#include <atalk/server_child.h>
-#ifndef __inline__
-#define __inline__
-#endif /* ! __inline__ */
-
/* hash/child functions: hash OR's pid */
#define CHILD_HASHSIZE 32
#define HASH(i) ((((i) >> 8) ^ (i)) & (CHILD_HASHSIZE - 1))
} server_child_fork;
-static __inline__ void hash_child(struct server_child_data **htable,
+static inline void hash_child(struct server_child_data **htable,
struct server_child_data *child)
{
struct server_child_data **table;
child->prevp = table;
}
-static __inline__ void unhash_child(struct server_child_data *child)
+static inline void unhash_child(struct server_child_data *child)
{
if (child->prevp) {
if (child->next)
}
}
-static __inline__ struct server_child_data
+static inline struct server_child_data
*resolve_child(struct server_child_data **table, const pid_t pid)
{
struct server_child_data *child;