Skip to content

Conversation

@reborn2266
Copy link
Contributor

the order of headers should not affect the compilation.
if no stdlib.h in queue.h, we would have when adjusting
the order:

In file included from queue.c:2:
./queue.h:73:42: error: unknown type name 'size_t'
bool q_remove_head(queue_t *q, char *sp, size_t bufsize);

the order of headers should not affect the compilation.
if no stdlib.h in queue.h, we would have when adjusting
the order:

In file included from queue.c:2:
./queue.h:73:42: error: unknown type name 'size_t'
bool q_remove_head(queue_t *q, char *sp, size_t bufsize);
@reborn2266 reborn2266 requested a review from jserv January 30, 2020 05:41
*/

#include <stdbool.h>
#include <stdlib.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be <stddef.h> instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, stddef.h is more appropriate. will do.

@jserv
Copy link
Contributor

jserv commented Jan 30, 2020

Not effective

@jserv jserv closed this Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants