Project

General

Profile

Actions

Bug #3343

closed

New cookie_* functions in stdio.h should be guarded by something

Added by davshao about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
02/08/2023
Due date:
% Done:

0%

Estimated time:

Description

fopencookie(3): Add a wrapper around funopen(3)
commit a765cedf26cef470ba7deee42c365f0221690a1a
Date: Sat Feb 4 14:54:20 2023 +0100

changed /usr/include/stdio.h to add

typedef ssize_t (cookie_read_function_t)(void *, char *, size_t);
+typedef ssize_t (cookie_write_function_t)(void *, const char *, size_t);
+typedef int (cookie_seek_function_t)(void *, off64_t *, int);
+typedef int (cookie_close_function_t)(void *);
+typedef struct {
cookie_read_function_t *read;
+ cookie_write_function_t *write;
+ cookie_seek_function_t *seek;
+ cookie_close_function_t *close;
+} cookie_io_functions_t;
+FILE *fopencookie(void *, const char *, cookie_io_functions_t);

These new functions are guarded by nothing, yet ssize_t has a definition
in the same header file guarded by something. Trying to build say png,
the compile is confused about ssize_t, among other things. For now, moving

#endif /* __BSD_VISIBLE */

to cover the new functions and structs allows png to build, but I
cannot guarantee other packages will regard this as sufficient.

Actions #1

Updated by swildner about 1 year ago

I will look.

Actions #2

Updated by swildner about 1 year ago

  • Status changed from New to Closed

I've fixed all issues I could find (a431bfe52a2aad0a18cf535124e1b488f6d7ce06).

Actions

Also available in: Atom PDF