gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 6/8] Refactor devices build


From: Pawel Kot
Subject: Re: [PATCH v2 6/8] Refactor devices build
Date: Mon, 13 Jan 2020 19:52:20 +0100

Hi,

On Tue, Dec 4, 2018 at 10:32 PM Ladislav Michl <address@hidden> wrote:
> Remove #ifdefs from device drivers and compile them only when
> selected. Once there, move device detection code in configure.ac
> to live in one place.

I'm fine with the overall logic but there are some bits that I do not like.

>  common/devices/osxbluetooth.m                 |   8 +-

Why .m?

> +#else
> +
> +int bluetooth_open(const char *addr, uint8_t channel, struct gn_statemachine *state)
> +{
> +       return -1;
> +}
> +
> +int bluetooth_close(int fd, struct gn_statemachine *state)
> +{
> +       return -1;
> +}
> +
> +int bluetooth_write(int fd, const __ptr_t bytes, int size, struct gn_statemachine *state)
> +{
> +       return -1;
> +}
> +
> +int bluetooth_read(int fd, __ptr_t bytes, int size, struct gn_statemachine *state)
> +{
> +       return -1;
> +}
> +
> +int bluetooth_select(int fd, struct timeval *timeout, struct gn_statemachine *state)
> +{
> +       return -1;
> +}
> +
> +#endif

This I really do not like and would like to avoid having it in the header files.

Cheers,
--
Pawel Kot

reply via email to

[Prev in Thread] Current Thread [Next in Thread]