]> arthur.barton.de Git - netatalk.git/commitdiff
better layout for struct vol
authordidg <didg>
Sun, 8 Nov 2009 22:08:04 +0000 (22:08 +0000)
committerdidg <didg>
Sun, 8 Nov 2009 22:08:04 +0000 (22:08 +0000)
include/atalk/logger.h
include/atalk/uam.h
include/atalk/util.h
include/atalk/volume.h

index 0ad267bcae1b12bb5f453bd2ffd2c90ba2788a21..e2cbbbca93614f2f2a4ff77d6aea8cde83a4a846 100644 (file)
@@ -159,7 +159,7 @@ void set_processname(const char *processname);
  */
 
 /* LOG macro func no.1: log the message to file */
-void make_log_entry(enum loglevels loglevel, enum logtypes logtype, const char *file, int line, char *message, ...);
+__attribute__ ((visibility("default"))) void make_log_entry(enum loglevels loglevel, enum logtypes logtype, const char *file, int line, char *message, ...);
 
 /* 
    Note:
index f54a5d31e1ac7a54256dca3183e141c96bcaeadd..f32eb7f278aa096e63163db23de768a8fa2cc676 100644 (file)
@@ -15,7 +15,7 @@
 #endif /* TRU64 */
 
 /* just a label for exported bits */
-#define UAM_MODULE_EXPORT
+#define UAM_MODULE_EXPORT __attribute__ ((visibility("default"))) 
 
 /* type of uam */
 #define UAM_MODULE_SERVER       1
@@ -78,17 +78,18 @@ struct session_info {
 };
 
 /* register and unregister uams with these functions */
-extern int uam_register (const int, const char *, const char *, ...);
-extern void uam_unregister (const int, const char *);
+extern UAM_MODULE_EXPORT int uam_register (const int, const char *, const char *, ...);
+extern UAM_MODULE_EXPORT void uam_unregister (const int, const char *);
 
 /* helper functions */
-extern struct passwd *uam_getname (void*, char *, const int);
-extern int uam_checkuser (const struct passwd *);
+extern UAM_MODULE_EXPORT struct passwd *uam_getname (void*, char *, const int);
+extern UAM_MODULE_EXPORT int uam_checkuser (const struct passwd *);
 
 /* afp helper functions */
-extern int uam_afp_read (void *, char *, size_t *,
+extern UAM_MODULE_EXPORT int uam_afp_read (void *, char *, size_t *,
                             int (*)(void *, void *, const int));
-extern int uam_afpserver_option (void *, const int, void *, size_t *);
+extern UAM_MODULE_EXPORT int uam_afpserver_option (void *, const int, void *, size_t *);
+
 #ifdef TRU64
 extern void uam_afp_getcmdline (int *, char ***);
 extern int uam_sia_validate_user (sia_collect_func_t *, int, char **,
index 670a7439dfc179bd045663b95b77929d3e1950b8..69a875565465257fef472d859fe91d432cdae75a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: util.h,v 1.13 2009-11-05 14:38:08 franklahm Exp $
+ * $Id: util.h,v 1.14 2009-11-08 22:08:04 didg Exp $
  */
 
 #ifndef _ATALK_UTIL_H
@@ -42,7 +42,7 @@ extern void fault_setup         (void (*fn)(void *));
 #define server_unlock(x)  (unlink(x))
 
 #ifndef HAVE_STRLCPY
-size_t strlcpy (char *, const char *, size_t);
+__attribute__ ((visibility("default"))) size_t strlcpy (char *, const char *, size_t);
 #endif
  
 #ifndef HAVE_STRLCAT
index c265829f0b2c8ab8806753d9330300858ddacdca..254e5053d9e7df975b10cb1e5b6d38bcbcaa4d14 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: volume.h,v 1.2 2009-10-29 13:06:19 franklahm Exp $
+ * $Id: volume.h,v 1.3 2009-11-08 22:08:04 didg Exp $
  *
  * Copyright (c) 1990,1994 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
 
 struct vol {
     struct vol         *v_next;
-    char        *v_localname;   /* as defined in AppleVolumes.default */
-    ucs2_t             *v_u8mname;     /* converted to utf8-mac in ucs2 */
-    ucs2_t             *v_macname;     /* mangled to legacy longname in ucs2 */
-    ucs2_t             *v_name;        /* either v_u8mname or v_macname */
+    u_int16_t          v_vid;
+    int                        v_flags;
+
     char               *v_path;
     
     struct dir         *v_dir, *v_root;
     hash_t             *v_hash;
-    int                        v_flags;
-#ifdef __svr4__
-    int                        v_qfd;
-#endif /*__svr4__*/
-    char               *v_gvs;
     time_t             v_mtime;
-    time_t             v_ctime;  /* volume creation date, not unix ctime */
 
-    u_int16_t          v_vid;
-    void                *v_nfsclient;
-    int                 v_nfs;
-    
+    charset_t          v_volcharset;   
+    charset_t          v_maccharset;
+    struct charset_functions   *v_mac;
+
     int                 v_casefold;
     size_t              max_filename;
     
-    char                *v_password;
     char                *v_veto;
 
-    char                *v_cnidscheme;
-    char                *v_dbpath;
-    dev_t               v_dev;              /* Unix volume device */
+    int                 v_adouble;    /* default adouble format */
+    int                 v_ad_options; /* adouble option NODEV, NOCACHE, etc.. */
+    char                *(*ad_path)(const char *, int);
+
     struct _cnid_db     *v_cdb;
     char                v_stamp[ADEDLEN_PRIVSYN];
     mode_t             v_umask;
@@ -63,19 +56,42 @@ struct vol {
     char               *v_forcegid;
 #endif 
 
+    /* adouble indirection */
+    struct vfs_ops      *vfs;   /* pointer to vfs_master_funcs for chaining */
+    const struct vfs_ops *vfs_modules[4];
+    int                 v_vfs_ea;       /* The AFPVOL_EA_xx flag */
+
+    ucs2_t             *v_u8mname;     /* converted to utf8-mac in ucs2 */
+    ucs2_t             *v_macname;     /* mangled to legacy longname in ucs2 */
+    ucs2_t             *v_name;        /* either v_u8mname or v_macname */
+
+    /* get/set volparams */
+    time_t             v_ctime;  /* volume creation date, not unix ctime */
+
+    dev_t               v_dev;    /* Unix volume device, Set but not used */
+
+#ifdef __svr4__
+    int                        v_qfd;
+#endif /*__svr4__*/
+    char               *v_gvs;
+    void                *v_nfsclient;
+    int                 v_nfs;
+    
+    struct charset_functions   *v_vol;  /* set but not used */
+
+    /* only when opening/closing volumes or in error */
+    char               *v_localname;   /* as defined in AppleVolumes.default */
     char                *v_volcodepage;
-    charset_t          v_volcharset;   
-    struct charset_functions   *v_vol;
-    char                       *v_maccodepage;
-    charset_t              v_maccharset;
-    struct charset_functions   *v_mac;
+    char               *v_maccodepage;
+
+    char                *v_password;
+
+    char                *v_cnidscheme;
+    char                *v_dbpath;
 
-    int                 v_deleted;    /* volume open but deleted in new config file */
     int                 v_hide;       /* new volume wait until old volume is closed */
     int                 v_new;        /* volume deleted but there's a new one with the same name */
-    int                 v_adouble;    /* default adouble format */
-    int                 v_ad_options; /* adouble option NODEV, NOCACHE, etc.. */
-
+    int                 v_deleted;    /* volume open but deleted in new config file */
     char                *v_root_preexec;
     char                *v_preexec;
 
@@ -85,11 +101,6 @@ struct vol {
     int                 v_root_preexec_close;
     int                 v_preexec_close;
     
-    /* adouble indirection */
-    struct vfs_ops      *vfs;   /* pointer to vfs_master_funcs for chaining */
-    const struct vfs_ops *vfs_modules[4];
-    int                 v_vfs_ea;       /* The AFPVOL_EA_xx flag */
-    char                *(*ad_path)(const char *, int);
 };
 
 #ifdef NO_LARGE_VOL_SUPPORT