torproject / tor Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ticket26223 #219
Ticket26223 #219
Conversation
We shouldn't actually need this code nearly anywhere we build: getdelim is POSIX, and mingw provides it.
Closes ticket 26223.
Looks great!
We could add a few extra comments if you like.
| getifaddrs \ | ||
| getline \ |
Why are these lines misaligned?
Is it a tabs and spaces thing?
Yup; added a commit to retabify configure.ac's lists.
|
|
||
| err: | ||
| if (line) | ||
| raw_free(line); |
Let's add a comment saying that we use raw_free() because getdelim() uses raw_malloc().
| @@ -103,4 +103,38 @@ char *read_file_to_str_until_eof(int fd, size_t max_bytes_to_read, | |||
| size_t *sz_out) | |||
| ATTR_MALLOC; | |||
|
|
|||
| #if !defined(HAVE_GETDELIM) || defined(TOR_UNIT_TESTS) | |||
| ssize_t compat_getdelim_(char **lineptr, size_t *n, int delim, FILE *stream); | |||
There's no function comment for getdelim() - do we expect developers to look it up in the relevant man page?
I think that's best -- since this is a POSIX standard, if our function differs from the manpage, one of them is wrong.
No description provided.
The text was updated successfully, but these errors were encountered: