]> arthur.barton.de Git - netatalk.git/commitdiff
remove gcc warnings and cleanup inline mess
authordidg <didg>
Tue, 25 Nov 2008 15:16:31 +0000 (15:16 +0000)
committerdidg <didg>
Tue, 25 Nov 2008 15:16:31 +0000 (15:16 +0000)
32 files changed:
bin/psorder/psorder.c
etc/afpd/afp_asp.c
etc/afpd/afp_dsi.c
etc/afpd/appl.c
etc/afpd/directory.c
etc/afpd/directory.h
etc/afpd/file.c
etc/afpd/filedir.c
etc/afpd/fork.c
etc/afpd/fork.h
etc/afpd/globals.h
etc/afpd/ofork.c
etc/afpd/unix.c
etc/afpd/volume.c
etc/papd/lp.c
etc/uams/uams_krb4/uams_krb4.c
etc/uams/uams_randnum.c
include/atalk/adouble.h
include/atalk/list.h
libatalk/adouble/ad_lock.c
libatalk/adouble/ad_mmap.c
libatalk/adouble/ad_open.c
libatalk/adouble/ad_private.h
libatalk/adouble/ad_sendfile.c
libatalk/cnid/cdb/cnid_cdb_add.c
libatalk/cnid/cdb/cnid_cdb_private.h
libatalk/cnid/cnid.c
libatalk/cnid/db3/cnid_db3.h
libatalk/cnid/db3/cnid_db3_open.c
libatalk/cnid/db3/cnid_db3_private.h
libatalk/cnid/tdb/cnid_tdb.h
libatalk/util/server_child.c

index 7ba4332f9eedfe3e4258189f68428cb562806cc2..450c8ee313f8d67f65d468c9a21fa12f787d81b8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -151,7 +151,7 @@ filesetup( inputfile, infd, tfile, tfd )
        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, "" );
index c167e53611a723177c995262d06a0a76c8d65803..c6517b14748266667ac52eacc799c7411c7e9bca 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -47,9 +47,9 @@ extern struct oforks  *writtenfork;
 
 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;
 
@@ -65,7 +65,7 @@ static __inline__ void afp_asp_close(AFPObj *obj)
 }
 
 /* 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];
index c480b1cac3957e96fd9693e89273bbb51266a150..110b1b409506b47fcc9444ff6c425316be7fbcc0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -56,7 +56,7 @@ static struct {
 } child;
 
 
-static __inline__ void afp_dsi_close(AFPObj *obj)
+static void afp_dsi_close(AFPObj *obj)
 {
     DSI *dsi = obj->handle;
 
index 6fd2abb15c4679166a5196741ded95ccad50516d..7934b48ea9702b08258acb6ed2ad883217cf5717 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -29,7 +29,7 @@
 
 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;
index 8253958078bba32447ccadd65423c0738f5ac709..577a425484db00c3c237eec1ed67f02a1afc5b25 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -392,9 +392,7 @@ struct dir *dir;
 /* 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;
@@ -1613,8 +1611,9 @@ struct path Cur_Path = {
     0,
     "",  /* mac name */
     ".", /* unix name */
+    NULL,
     0,  /* stat is not set */
-    0,  /* */
+    0  /* errno */
 };
 
 /* ------------------ */
@@ -2147,10 +2146,9 @@ struct dir       *dir, *newparent;
 
 #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;
index 35971bf468d8d7eef13d12ef645174ba6aa234ae..12b64790434ca173248ec3ab7f86b0d2cf324c94 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -70,7 +70,7 @@ struct path {
 };
 
 #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
@@ -196,7 +196,7 @@ extern struct dir   *adddir __P((struct vol *, struct dir *,
 
 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 *));
index 510d64e7f75b6e4033f8cb71576751db328d2f36..efbc55ab05e30a4491795655569e00201fd7a496 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -1326,7 +1326,7 @@ int       ibuflen _U_, *rbuflen;
 }
 
 /* ----------------------- */
-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;
index e74b2f3a5962cb207b7ad562845cee0ca9ac21cd..93a9c9940c90afdcbf60a9e58289f5dc5556f13c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -569,7 +569,7 @@ int ibuflen _U_, *rbuflen;
            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;
index c63cca243ed46bdab84e010d15bbf7883e60b206..c537c03b6ff16ad7daa79dcfd44a4cd34968d317 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -162,7 +162,7 @@ static int is_neg(int is64, off_t val)
     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;
@@ -778,7 +778,7 @@ int ibuflen, *rbuflen;
 #undef UNLOCKBIT
 
 /* --------------------------- */
-static __inline__ int crlf( of )
+static int crlf( of )
 struct ofork   *of;
 {
     struct extmap      *em;
@@ -798,7 +798,7 @@ struct ofork        *of;
 }
 
 
-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)
@@ -1197,7 +1197,7 @@ int               ibuflen _U_, *rbuflen;
 }
 
 
-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)
 {
index bd44edfd6732dea22b7cd792dd33ebd76eefdc3e..0e7f7739f231b1e32972fc37f5f5cbddf4974137 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -22,6 +22,7 @@ struct file_key {
 };
 
 struct ofork {
+    struct file_key     key;
     struct adouble     *of_ad;
     struct vol          *of_vol;
     struct dir         *of_dir;
@@ -29,7 +30,6 @@ struct ofork {
     u_int16_t           of_refnum;
     int                 of_flags;
 
-    struct file_key     key;
     struct ofork        **prevp, *next;
     struct ofork        *of_d_prev, *of_d_next;
 };
index c3f40990a581310cbb0ec0bce71fc22f77b78908..48571496fee1a189a1076012a3c0dc1012d54ce8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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)
index b124351a2b9cba91d7c5e8feb9a604db50f48024..550013d76299783d961712df3b4c7e6b58e5e91f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -38,7 +38,7 @@ static u_short                lastrefnum = 0;
 
 
 /* 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;
@@ -49,7 +49,7 @@ static __inline__ unsigned long hashfn(const struct file_key *key)
     return key->inode & (OFORK_HASHSIZE - 1);
 }
 
-static __inline__ void of_hash(struct ofork *of)
+static void of_hash(struct ofork *of)
 {
     struct ofork **table;
 
@@ -60,7 +60,7 @@ static __inline__ void of_hash(struct ofork *of)
     of->prevp = table;
 }
 
-static __inline__ void of_unhash(struct ofork *of)
+static void of_unhash(struct ofork *of)
 {
     if (of->prevp) {
         if (of->next)
index 680a51619ff65ae2dee51a562a1babbc46a9f7e4..58170528941c6f6f38ccfab6c28b511709c7b816 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -99,7 +99,7 @@ u_int32_t   *bsize;
     return( AFP_OK );
 }
 
-static __inline__ int utombits( bits )
+static int utombits( bits )
 mode_t bits;
 {
     int                mbits;
@@ -205,7 +205,7 @@ const gid_t gid;
     return( 0 );
 }
 
-static __inline__ mode_t mtoubits( bits )
+static mode_t mtoubits( bits )
 u_char bits;
 {
     mode_t     mode;
index 30079cfaec24418bf19acbc22af42a4a9fe73fe7..1dfadcf8ba14b8b8ec9439a00e3decc5e8183fad 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -186,7 +186,7 @@ static const _vol_opt_name vol_opt_casefold[] = {
 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;
index 4fdbe9cff5d3eba8d0769dad0848cdd7a4d43d26..6740a386c9c86d15d47f8ac7d7273bc292daefde 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -885,7 +885,7 @@ int lp_print()
 }
 
 #ifndef HAVE_CUPS
-int lp_disconn_unix( fd )
+int lp_disconn_unix( int fd )
 {
     return( close( fd ));
 }
index bc7f1430d169f1b61d54bb327cc70947be6f64a8..14c849b5046c4120bdcea2e440339de7be6db337 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -86,7 +86,7 @@ struct ClearToken {
 
 #ifdef KRB
 
-static __inline__ void lcase( p )
+static void lcase( p )
     char       *p;
 {
     for (; *p; p++ ) {
@@ -97,7 +97,7 @@ static __inline__ void lcase( p )
     return;
 }
 
-static __inline__ void ucase( p )
+static void ucase( p )
     char       *p;
 {
     for (; *p; p++ ) {
index b2be7f231464a04f5f88db181d99d0d10ad2162a..1256a1bca58bf8824824a6921ad996476cadd510 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $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) 
@@ -53,10 +53,6 @@ char *strchr (), *strrchr ();
 #include <crack.h>
 #endif /* USE_CRACKLIB */
 
-#ifndef __inline__
-#define __inline__
-#endif /* __inline__ */
-
 #define PASSWDLEN 8
 
 static C_Block         seskey;
@@ -71,7 +67,7 @@ static u_int8_t         randbuf[8];
 
 
 /* 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)
index cafe27a4e5d74926d4b41171bc430e1cd933105e..929bf777a552fa2bd5b530f15479d28e89c2b92f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
  *
@@ -246,7 +246,8 @@ struct adouble {
     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
@@ -423,10 +424,7 @@ extern int ad_metadata    __P((const char *, int, struct adouble *));
  * 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 */
index 82518ebdbf8ba8fe727f5e7f625cfbdf6ee72dde..bb39b90c3b9063bcbb0252f28ed27afcdb30d403 100644 (file)
@@ -4,11 +4,6 @@
 #ifndef _ATALK_LIST_H
 #define _ATALK_LIST_H
 
-/* test for inline */
-#ifndef __inline__
-#define __inline__
-#endif
-
 /*
  * Simple doubly linked list implementation.
  *
@@ -39,7 +34,7 @@ struct list_head {
  * 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)
 {
@@ -57,7 +52,7 @@ static __inline__ void __list_add(struct list_head * new,
  * 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);
 }
@@ -70,7 +65,7 @@ static __inline__ void list_add(struct list_head *new, struct list_head *head)
  * 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);
 }
@@ -82,7 +77,7 @@ static __inline__ void list_add_tail(struct list_head *new, struct list_head *he
  * 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;
@@ -94,7 +89,7 @@ static __inline__ void __list_del(struct list_head * 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);
 }
@@ -103,7 +98,7 @@ static __inline__ void list_del(struct list_head *entry)
  * 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);
@@ -113,7 +108,7 @@ static __inline__ void list_del_init(struct 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;
 }
@@ -123,7 +118,7 @@ static __inline__ int list_empty(struct list_head *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;
 
index a5d00e9cbabea271f5fbf8ad1a58cde5045f3ddb..be7538689a9d159eda1a2c4a86aa54c381b002b1 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $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.
@@ -67,7 +67,7 @@ static int OVERLAP(off_t a, off_t alen, off_t b, off_t blen)
 #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;
 
@@ -111,7 +111,7 @@ static __inline__ void adf_freelock(struct ad_fd *ad, const int 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;
@@ -128,7 +128,7 @@ static __inline__ void adf_unlock(struct ad_fd *ad, const int user)
 
 /* 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;
@@ -142,7 +142,7 @@ static __inline__ void adf_relockrange(struct ad_fd *ad, int fd,
 
 
 /* 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)
@@ -164,7 +164,7 @@ static __inline__ int adf_findlock(struct ad_fd *ad,
 
 
 /* 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)
index 0d6df4caa7e5c4eaac5151719d4517d79bdd8d62..c40dfdded4f112d219e884c9006a44a4a2c28df9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
@@ -19,7 +19,7 @@
 
 #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)
 {
index 724aee94c68de04ad057bb80bf307ccfea9e4859..086b5d850fd02c0996aacd4a6c90e2e046a00b52 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -712,9 +712,7 @@ ad_path( path, adflags )
  * ._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];
@@ -833,7 +831,7 @@ int ret = 0;
 #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 );
index f87d51e15638b9f4760c3bc4ead5508bab1682c5..771ec32482080e10e8dfaea583415dea0024e40d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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. */
index 5245c6aeef4cf387bb15cd8a389256ccbb08cfcd..e4057fe68d318eb252177d1020d1e9ff6446d997 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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.
@@ -140,7 +140,7 @@ ssize_t sys_sendfile(int out_fd, int in_fd, off_t *_offset, size_t count)
 #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)
 {
index 6b9924aad8f9e27194ac9be8fd2d4c78670139b4..4fd6500e7f179c2cf879b50d9aadf7531d2b12f8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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;
@@ -67,10 +70,6 @@ unsigned char *make_cnid_data(const struct stat *st,const cnid_t did,
 
     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)
index a59ae84f44cfa6c93f7cd0b9492c1c29e42888d3..a5a77e89f9f63f096da9db78ee39755421ee7b53 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
@@ -168,64 +168,8 @@ typedef struct CNID_private {
  * 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 */
index 79244d300d085e98133e911030e7785315f186c1..d17f31e5992fa8d3d5c506ad5169fd29b329f190 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $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>
@@ -98,8 +98,8 @@ struct _cnid_db *cnid_open(const char *volpath, mode_t mask, char *type, int fla
     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)) {
index 9986544c9737119dab9573284fbdf7aa09606ba0..1b01ebe090e77c5bfa3c4f0b50ba9ca7b922a4ec 100644 (file)
@@ -14,7 +14,7 @@
 #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
@@ -26,7 +26,7 @@ static __inline__ int db3_txn_abort(DB_TXN *db_txn)
 }
 
 /* -------------------- */
-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
@@ -38,7 +38,7 @@ static __inline__ int db3_txn_begin(DB_ENV *db_env, DB_TXN *parent, DB_TXN **db_
 }
             
 /* -------------------- */
-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
index 98356749e9cc1926c134580fe6b16e6dd27c8a7a..c7c1eb1b210b7d9af63613117ceeac935d4a3f74 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $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.
@@ -142,7 +142,7 @@ static int my_open(DB * p, const char *f, const char *d, DBTYPE t, u_int32_t fla
 /* --------------- */
 
 /* 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;
 
index 7769f59bd9f290c30730b20f0ae71ecd52c5778e..ee0cc0ebdb0c77c9cb5e30755f3d8e6a72824978 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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
@@ -101,12 +101,8 @@ typedef struct CNID_private {
  * 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)
 {
index 29bed97715dafcc8e249e3ef4d8cefd37f2ca878..f361f5e2c988c4252d2a686c371a75c49329cd0a 100644 (file)
@@ -88,7 +88,7 @@ extern int cnid_tdb_delete __P((struct _cnid_db *, const cnid_t));
 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)
 {
index 9f96c4bebacc9ff599a44115fe7ebd4990e6f976..06d944f6455d86e7253147094446d0e3b1d82add 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $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))
@@ -77,7 +73,7 @@ typedef struct server_child_fork {
 } 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;
@@ -89,7 +85,7 @@ static __inline__ void hash_child(struct server_child_data **htable,
   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)
@@ -98,7 +94,7 @@ static __inline__ void unhash_child(struct server_child_data *child)
   }
 }
 
-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;