commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 05/28: Mark library stubs as weak


From: Samuel Thibault
Subject: [hurd] 05/28: Mark library stubs as weak
Date: Wed, 16 Nov 2016 08:30:26 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 267995f0c2aea8030c6126f62dc41ff63d80caa7
Author: Samuel Thibault <address@hidden>
Date:   Sun Oct 30 21:15:47 2016 +0100

    Mark library stubs as weak
    
    So that static linking of e.g. console.static can work.
    
    * libdiskfs/io-stubs.c (diskfs_S_io_readsleep, diskfs_S_io_eofnotify,
    diskfs_S_io_postnotify, diskfs_S_io_readnotify): Mark weak.
    * libnetfs/fsstubs.c (netfs_S_file_notice_changes, netfs_S_file_getfh,
    netfs_S_ifsock_getsockaddr): Likewise.
    * libnetfs/fsysstubs.c (netfs_S_fsys_getfile: netfs_S_fsys_getpriv,
    netfs_S_fsys_init, netfs_S_fsys_forward, netfs_S_fsys_startup):
    Likewise.
    * libpager/stubs.c (_pager_S_memory_object_copy,
    _pager_S_memory_object_data_write,
    _pager_S_memory_object_supply_completed): Likewise.
    * libtrivfs/fsys-stubs.c (trivfs_S_fsys_startup, trivfs_S_fsys_getpriv,
    trivfs_S_fsys_init, trivfs_S_fsys_getfile): Likewise.
    * libtrivfs/io-stubs.c (trivfs_S_io_map_cntl, trivfs_S_io_get_conch,
    trivfs_S_io_release_conch, trivfs_S_io_eofnotify, trivfs_S_io_prenotify,
    trivfs_S_io_postnotify, trivfs_S_io_readsleep, trivfs_S_io_sigio,
    trivfs_S_io_readnotify): Likewise.
---
 libdiskfs/io-stubs.c   |  8 ++++----
 libnetfs/fsstubs.c     |  6 +++---
 libnetfs/fsysstubs.c   | 10 +++++-----
 libnetfs/iostubs.c     | 20 ++++++++++----------
 libpager/stubs.c       |  6 +++---
 libtrivfs/fsys-stubs.c |  8 ++++----
 libtrivfs/io-stubs.c   | 18 +++++++++---------
 7 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/libdiskfs/io-stubs.c b/libdiskfs/io-stubs.c
index 592b3d8..103591f 100644
--- a/libdiskfs/io-stubs.c
+++ b/libdiskfs/io-stubs.c
@@ -23,7 +23,7 @@
 /* Implement io_readsleep as described in <hurd/io.defs>
    Semantics of ordinary files say this shouldn't happen, because
    we never set use_read_size in the shared data. */
-kern_return_t
+kern_return_t __attribute__((weak))
 diskfs_S_io_readsleep (struct protid *cred)
 {
   if (!cred)
@@ -34,7 +34,7 @@ diskfs_S_io_readsleep (struct protid *cred)
 
 /* Implement io_eofnotify as described in <hurd/io.defs>. 
    We don't use this feature. */
-kern_return_t
+kern_return_t __attribute__((weak))
 diskfs_S_io_eofnotify (struct protid *cred)
 {
   if (!cred)
@@ -45,7 +45,7 @@ diskfs_S_io_eofnotify (struct protid *cred)
 
 /* Implement io_postnotify as described in <hurd/io.defs>.
    We don't use this feature. */
-kern_return_t
+kern_return_t __attribute__((weak))
 diskfs_S_io_postnotify (struct protid *cred,
                        vm_offset_t start __attribute__ ((unused)), 
                        vm_offset_t end __attribute__ ((unused)))
@@ -55,7 +55,7 @@ diskfs_S_io_postnotify (struct protid *cred,
 
 /* Implement io_readnotify as described in <hurd/io.defs>.
    We don't use this feature. */
-kern_return_t
+kern_return_t __attribute__((weak))
 diskfs_S_io_readnotify (struct protid *cred)
 {
   return cred ? 0 : EOPNOTSUPP;
diff --git a/libnetfs/fsstubs.c b/libnetfs/fsstubs.c
index 75bd790..b260f5d 100644
--- a/libnetfs/fsstubs.c
+++ b/libnetfs/fsstubs.c
@@ -23,21 +23,21 @@
 #include "fs_S.h"
 #include "ifsock_S.h"
 
-error_t
+error_t __attribute__((weak))
 netfs_S_file_notice_changes (struct protid *user,
                             mach_port_t port)
 {
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_file_getfh (struct protid *user,
                    char **data, mach_msg_type_number_t *ndata)
 {
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_ifsock_getsockaddr (struct protid *user,
                            mach_port_t *address)
 {
diff --git a/libnetfs/fsysstubs.c b/libnetfs/fsysstubs.c
index a64fd64..6cf12cc 100644
--- a/libnetfs/fsysstubs.c
+++ b/libnetfs/fsysstubs.c
@@ -22,7 +22,7 @@
 #include "netfs.h"
 #include "fsys_S.h"
 
-error_t
+error_t __attribute__((weak))
 netfs_S_fsys_getfile (struct netfs_control *cntl,
                      mach_port_t reply,
                      mach_msg_type_name_t reply_type,
@@ -34,7 +34,7 @@ netfs_S_fsys_getfile (struct netfs_control *cntl,
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_fsys_getpriv (struct netfs_control *cntl,
                      mach_port_t reply,
                      mach_msg_type_name_t reply_type,
@@ -45,7 +45,7 @@ netfs_S_fsys_getpriv (struct netfs_control *cntl,
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_fsys_init (struct netfs_control *cntl,
                   mach_port_t reply,
                   mach_msg_type_name_t reply_type,
@@ -54,7 +54,7 @@ netfs_S_fsys_init (struct netfs_control *cntl,
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_fsys_forward (mach_port_t cntl,
                      mach_port_t reply,
                      mach_msg_type_name_t reply_type,
@@ -64,7 +64,7 @@ netfs_S_fsys_forward (mach_port_t cntl,
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_fsys_startup (mach_port_t bootstrap,
                      mach_port_t reply,
                      mach_msg_type_name_t reply_type,
diff --git a/libnetfs/iostubs.c b/libnetfs/iostubs.c
index 1465b43..a5ff450 100644
--- a/libnetfs/iostubs.c
+++ b/libnetfs/iostubs.c
@@ -22,7 +22,7 @@
 #include "netfs.h"
 #include "io_S.h"
 
-error_t
+error_t __attribute__((weak))
 netfs_S_io_map (struct protid *user, 
                mach_port_t *rdobj, mach_msg_type_name_t *rdobjtype,
                mach_port_t *wrobj, mach_msg_type_name_t *wrobjtype)
@@ -30,7 +30,7 @@ netfs_S_io_map (struct protid *user,
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_io_map_cntl (struct protid *user,
                     mach_port_t *obj,
                     mach_msg_type_name_t *objtype)
@@ -38,51 +38,51 @@ netfs_S_io_map_cntl (struct protid *user,
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_io_get_conch (struct protid *user)
 {
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_io_release_conch (struct protid *user)
 {
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_io_eofnotify (struct protid *user)
 {
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_io_prenotify (struct protid *user,
                      vm_offset_t start, vm_offset_t stop)
 {
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_io_postnotify (struct protid *user,
                       vm_offset_t start, vm_offset_t stop)
 {
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_io_readnotify (struct protid *user)
 {
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_io_readsleep (struct protid *user)
 {
   return EOPNOTSUPP;
 }
 
-error_t
+error_t __attribute__((weak))
 netfs_S_io_sigio (struct protid *user)
 {
   return EOPNOTSUPP;
diff --git a/libpager/stubs.c b/libpager/stubs.c
index 9a766ec..964985b 100644
--- a/libpager/stubs.c
+++ b/libpager/stubs.c
@@ -20,7 +20,7 @@
 #include "memory_object_S.h"
 #include <stdio.h>
 
-kern_return_t
+kern_return_t __attribute__((weak))
 _pager_S_memory_object_copy (struct pager *p,
                           memory_object_control_t obj_ctl,
                           vm_offset_t off,
@@ -31,7 +31,7 @@ _pager_S_memory_object_copy (struct pager *p,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 _pager_S_memory_object_data_write (struct pager *p,
                                 mach_port_t ctl,
                                 vm_offset_t off,
@@ -42,7 +42,7 @@ _pager_S_memory_object_data_write (struct pager *p,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 _pager_S_memory_object_supply_completed (struct pager *p,
                                       mach_port_t ctl,
                                       vm_offset_t off,
diff --git a/libtrivfs/fsys-stubs.c b/libtrivfs/fsys-stubs.c
index 313328a..44d411c 100644
--- a/libtrivfs/fsys-stubs.c
+++ b/libtrivfs/fsys-stubs.c
@@ -22,7 +22,7 @@
 #include "priv.h"
 #include "trivfs_fsys_S.h"
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_fsys_startup (mach_port_t bootport,
                       mach_port_t reply,
                       mach_msg_type_name_t replytype,
@@ -34,7 +34,7 @@ trivfs_S_fsys_startup (mach_port_t bootport,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_fsys_getpriv (struct trivfs_control *cntl,
                       mach_port_t reply,
                       mach_msg_type_name_t replytype,
@@ -45,7 +45,7 @@ trivfs_S_fsys_getpriv (struct trivfs_control *cntl,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_fsys_init (struct trivfs_control *control,
                    mach_port_t reply,
                    mach_msg_type_name_t replytype,
@@ -55,7 +55,7 @@ trivfs_S_fsys_init (struct trivfs_control *control,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_fsys_getfile (struct trivfs_control *cntl,
                       mach_port_t reply,
                       mach_msg_type_name_t replytype,
diff --git a/libtrivfs/io-stubs.c b/libtrivfs/io-stubs.c
index ab6b1b3..1686f3f 100644
--- a/libtrivfs/io-stubs.c
+++ b/libtrivfs/io-stubs.c
@@ -22,7 +22,7 @@
 #include "priv.h"
 #include "trivfs_io_S.h"
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_io_map_cntl (struct trivfs_protid *cred,
                      mach_port_t reply,
                      mach_msg_type_name_t replytype,
@@ -32,7 +32,7 @@ trivfs_S_io_map_cntl (struct trivfs_protid *cred,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_io_get_conch (struct trivfs_protid *cred,
                       mach_port_t reply,
                       mach_msg_type_name_t replytype)
@@ -40,7 +40,7 @@ trivfs_S_io_get_conch (struct trivfs_protid *cred,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_io_release_conch (struct trivfs_protid *cred,
                           mach_port_t reply,
                           mach_msg_type_name_t replytype)
@@ -48,7 +48,7 @@ trivfs_S_io_release_conch (struct trivfs_protid *cred,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_io_eofnotify (struct trivfs_protid *cred,
                       mach_port_t reply,
                       mach_msg_type_name_t replytype)
@@ -56,7 +56,7 @@ trivfs_S_io_eofnotify (struct trivfs_protid *cred,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_io_prenotify (struct trivfs_protid *cred,
                       mach_port_t reply,
                       mach_msg_type_name_t replytype,
@@ -66,7 +66,7 @@ trivfs_S_io_prenotify (struct trivfs_protid *cred,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_io_postnotify (struct trivfs_protid *cred,
                        mach_port_t reply,
                        mach_msg_type_name_t replytype,
@@ -76,7 +76,7 @@ trivfs_S_io_postnotify (struct trivfs_protid *cred,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_io_readsleep (struct trivfs_protid *cred,
                       mach_port_t reply,
                       mach_msg_type_name_t replytype)
@@ -84,7 +84,7 @@ trivfs_S_io_readsleep (struct trivfs_protid *cred,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_io_sigio (struct trivfs_protid *cred,
                   mach_port_t reply,
                   mach_msg_type_name_t replytype)
@@ -92,7 +92,7 @@ trivfs_S_io_sigio (struct trivfs_protid *cred,
   return EOPNOTSUPP;
 }
 
-kern_return_t
+kern_return_t __attribute__((weak))
 trivfs_S_io_readnotify (struct trivfs_protid *cred,
                     mach_port_t reply,
                     mach_msg_type_name_t replytype)

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]