title: I was perusing glibc when I came across the socket code, can someone explain what is going on?
body: <p>Here is the source I was browsing: <a href="http://sourceware.org/git/?p=glibc.git;a=tree;f=socket;h=8217353b094378659dae035c0619f6495172523c;hb=2543fef229599e8a6e4feeea65ca2dd3f984154f" rel="noreferrer">glibc source</a>. My particular question arises from this particular set of functions: <a href="http://sourceware.org/git/?p=glibc.git;a=tree;f=socket;h=8217353b094378659dae035c0619f6495172523c;hb=2543fef229599e8a6e4feeea65ca2dd3f984154f" rel="noreferrer">socket library</a>. </p>
  
  <p>For example(most of the functions are set up this way) <code>socket/bind.c</code>'s source is:</p>
  
  <pre><code>  19 #include &lt;errno.h&gt;
    20 #include &lt;sys/socket.h&gt;
    21 
    22 /* Give the socket FD the local address ADDR (which is LEN bytes long).  */
    23 int
    24 __bind (fd, addr, len)
    25      int fd;
    26      __CONST_SOCKADDR_ARG addr;
    27      socklen_t len;
    28 {
    29   __set_errno (ENOSYS);
    30   return -1;
    31 }
    32 
    33 weak_alias (__bind, bind)
    34 
    35 stub_warning (bind)
    36 #include &lt;stub-tag.h&gt;
  </code></pre>
  
  <p>I admit I didn't spend a lot of time, but where exactly is the code for the actual function and what is going on? Is this a well used paradigm?</p>