Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | clearer way to get sizeof sockaddr_in.sin_zero |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
b43586041b061b69c9e4d20bd07cede1 |
User & Date: | aldo 2016-12-12 23:11:39 |
Context
2016-12-13
| ||
00:03 | added sxml match check-in: 4d83ff5dcb user: aldo tags: trunk | |
2016-12-12
| ||
23:11 | clearer way to get sizeof sockaddr_in.sin_zero check-in: b43586041b user: aldo tags: trunk | |
22:48 | fixed sockaddr_in.sin_zero size, thanks to gwatt check-in: f1282eed3e user: aldo tags: trunk | |
Changes
Changes to socket.sls.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
(define-ftype in_addr
(struct (s_addr in_addr_t)))
;; WARNING- here the size of sin_zero should be calculated on your machine as:
#;(import (c-eval))
#;(parameterize ([c-eval-includes '("stdio.h" "sys/socket.h" "netinet/in.h")])
(c-eval-printf "%d" "sizeof(struct sockaddr_in) - sizeof (sa_family_t) - sizeof(in_port_t) - sizeof(in_addr_t)"))
;; in my case (a6le) -> 8
(define-ftype sockaddr_in
(struct
(sin_family sa_family_t)
(sin_port in_port_t)
(sin_addr in_addr)
|
|
|
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
(define-ftype in_addr
(struct (s_addr in_addr_t)))
;; WARNING- here the size of sin_zero should be calculated on your machine as:
#;(import (c-eval))
#;(parameterize ([c-eval-includes '("stdio.h" "sys/socket.h" "netinet/in.h")])
(c-eval-printf "%d" "sizeof(((struct sockaddr_in *) NULL)->sin_zero)"))
;; in my case (a6le) -> 8
(define-ftype sockaddr_in
(struct
(sin_family sa_family_t)
(sin_port in_port_t)
(sin_addr in_addr)
|