Skip to content

Add fcntl function support #4

@GabrielGanne

Description

@GabrielGanne

In the project xdffileio, we only use the function fcntl with the commands F_GETFL and F_SETFL.
I propose that we write two functions in the mmlib to replace the use of fcntl:

fcntl(fd, F_GETFL) could be replaced by: int mm_getflags (int fd)
-> This function returns the value of the file status flag of fd on success, otherwise returns -1 and errno is set to the appropriate value.

fcntl(fd, F_SETFL, flags) could be replaced by: int mm_setflags(int fd, int flags)
-> Set the file descriptor flags of fd to the value specified by flags. Returns -1 in case of error and errno is set to the appropriate value, otherwise returns 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions