Changeset 11b7f58 in rtems-libbsd


Ignore:
Timestamp:
Oct 24, 2013, 12:46:25 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, afaeccc05a556f6aa25ba044a7e49d6aa634a59e, freebsd-9.3, master
Children:
e859231
Parents:
2208c40
git-author:
Sebastian Huber <sebastian.huber@…> (10/24/13 12:46:25)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/31/13 12:18:51)
Message:

Fix errno conflict

Newlib defines errno as

#define errno (*errno())

In case this is expanded in a function parameter, e.g.

void f(int errno) { ... }

then we have a function pointer parameter instead of the integer scalar.

Location:
freebsd/sys
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sys/netinet/in_pcb.c

    r2208c40 r11b7f58  
    3434 */
    3535
     36#ifdef __rtems__
     37#include <errno.h>
     38#undef errno
     39#endif /* __rtems__ */
    3640#include <sys/cdefs.h>
    3741__FBSDID("$FreeBSD$");
  • freebsd/sys/netinet/in_pcb.h

    r2208c40 r11b7f58  
    442442 * Flags for inp_flags2.
    443443 */
    444 #define INP_LLE_VALID           0x00000001 /* cached lle is valid */
     444#define INP_LLE_VALID           0x00000001 /* cached lle is valid */   
    445445#define INP_RT_VALID            0x00000002 /* cached rtentry is valid */
    446446
     
    504504        in_pcblookup_hash(struct inpcbinfo *, struct in_addr, u_int,
    505505            struct in_addr, u_int, int, struct ifnet *);
    506 #ifndef __rtems__
    507 void  in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr,
    508       int, struct inpcb *(*)(struct inpcb *, int));
    509 #else
    510 void  in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr faddr, int errno,
    511     struct inpcb *(*notify)(struct inpcb *, int));
    512 #endif
     506void    in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr,
     507            int, struct inpcb *(*)(struct inpcb *, int));
    513508void    in_pcbref(struct inpcb *);
    514509void    in_pcbrehash(struct inpcb *);
  • freebsd/sys/netinet/tcp_subr.c

    r2208c40 r11b7f58  
    3232 */
    3333
     34#ifdef __rtems__
     35#include <errno.h>
     36#undef errno
     37#endif /* __rtems__ */
    3438#include <sys/cdefs.h>
    3539__FBSDID("$FreeBSD$");
  • freebsd/sys/netinet/tcp_var.h

    r2208c40 r11b7f58  
    459459        u_long  tcps_sack_send_blocks;      /* SACK blocks (options) sent     */
    460460        u_long  tcps_sack_sboverflow;       /* times scoreboard overflowed */
    461 
     461       
    462462        /* ECN related stats */
    463463        u_long  tcps_ecn_ce;            /* ECN Congestion Experienced */
     
    591591void     tcp_ctlinput(int, struct sockaddr *, void *);
    592592int      tcp_ctloutput(struct socket *, struct sockopt *);
    593 #ifndef __rtems__
    594593struct tcpcb *
    595    tcp_drop(struct tcpcb *, int);
    596 #else
    597 struct tcpcb *
    598 tcp_drop(struct tcpcb *tp, int errno);
    599 #endif
     594         tcp_drop(struct tcpcb *, int);
    600595void     tcp_drain(void);
    601596void     tcp_init(void);
     
    620615void     tcp_mss(struct tcpcb *, int);
    621616int      tcp_mssopt(struct in_conninfo *);
    622 #ifndef __rtems__
    623617struct inpcb *
    624   tcp_drop_syn_sent(struct inpcb *, int);
     618        tcp_drop_syn_sent(struct inpcb *, int);
    625619struct inpcb *
    626    tcp_mtudisc(struct inpcb *, int);
    627 #else
    628 struct inpcb *
    629 tcp_drop_syn_sent(struct inpcb *inp, int errno);
    630 struct inpcb *
    631 tcp_mtudisc(struct inpcb *inp, int errno);
    632 #endif
     620         tcp_mtudisc(struct inpcb *, int);
    633621struct tcpcb *
    634622         tcp_newtcpcb(struct inpcb *);
  • freebsd/sys/netinet/udp_usrreq.c

    r2208c40 r11b7f58  
    3434 */
    3535
     36#ifdef __rtems__
     37#include <errno.h>
     38#undef errno
     39#endif /* __rtems__ */
    3640#include <sys/cdefs.h>
    3741__FBSDID("$FreeBSD$");
  • freebsd/sys/netinet/udp_var.h

    r2208c40 r11b7f58  
    9292
    9393#ifdef _KERNEL
     94#ifdef __rtems__
     95#include <errno.h>
     96#undef errno
     97#endif /* __rtems__ */
    9498/*
    9599 * In-kernel consumers can use these accessor macros directly to update
  • freebsd/sys/netinet6/in6_pcb.c

    r2208c40 r11b7f58  
    6363 */
    6464
     65#ifdef __rtems__
     66#include <errno.h>
     67#undef errno
     68#endif /* __rtems__ */
    6569#include <sys/cdefs.h>
    6670__FBSDID("$FreeBSD$");
  • freebsd/sys/netinet6/in6_pcb.h

    r2208c40 r11b7f58  
    8787                           u_int, const struct sockaddr *, u_int, int, void *,
    8888                           struct inpcb *(*)(struct inpcb *, int)));
    89 #ifndef __rtems__
    9089struct inpcb *
    9190        in6_rtchange __P((struct inpcb *, int));
    92 #else
    93 struct inpcb *
    94   in6_rtchange(struct inpcb *inp, int errno);
    95 #endif
    9691struct sockaddr *
    9792        in6_sockaddr __P((in_port_t port, struct in6_addr *addr_p));
Note: See TracChangeset for help on using the changeset viewer.