diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-07-17 18:22:32 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2007-07-17 18:22:32 +0200 |
commit | 4e3e38322033b63d8b468319047e7a2a4826571c (patch) | |
tree | d72db1637032fd2f2bbcaea44b7f7846e7b9b0cc | |
parent | 2bba936912ae20b885941a2f1c9ca7a1cf3be998 (diff) | |
download | salsa-lib-4e3e38322033b63d8b468319047e7a2a4826571c.tar.gz |
Add --disable-deprecated configure option.
-rw-r--r-- | configure.ac | 13 | ||||
-rw-r--r-- | src/conf.h | 30 | ||||
-rw-r--r-- | src/ctl_macros.h | 22 | ||||
-rw-r--r-- | src/global.h | 10 | ||||
-rw-r--r-- | src/hctl_macros.h | 2 | ||||
-rw-r--r-- | src/input.h | 5 | ||||
-rw-r--r-- | src/mixer_macros.h | 16 | ||||
-rw-r--r-- | src/output.h | 4 | ||||
-rw-r--r-- | src/pcm_macros.h | 14 | ||||
-rw-r--r-- | src/rawmidi_macros.h | 2 | ||||
-rw-r--r-- | src/recipe.h.in | 3 | ||||
-rw-r--r-- | src/seq.h | 4 | ||||
-rw-r--r-- | src/timer_macros.h | 20 |
13 files changed, 84 insertions, 61 deletions
diff --git a/configure.ac b/configure.ac index c5f3f95..1871e01 100644 --- a/configure.ac +++ b/configure.ac @@ -123,6 +123,18 @@ AC_SUBST(SALSA_HAS_ASYNC_SUPPORT) AM_CONDITIONAL(LINK_LIBASOUND, test "$libasound" = "yes") +AC_ARG_ENABLE(deprecated, + AS_HELP_STRING([--disable-deprecated], + [don't mark deprecated attribute for non-working functions]), + markdeprecated="$enableval", markdeprecated="yes") + +if test "$markdeprecated" = "yes"; then + SALSA_MARK_DEPRECATED=1 +else + SALSA_MARK_DEPRECATED=0 +fi +AC_SUBST(SALSA_MARK_DEPRECATED) + dnl OK, let's output... AC_OUTPUT([ @@ -157,3 +169,4 @@ echo " - ALSA-sequencer dummy interface: $sndseq" echo " - TLV (dB) support: $tlv" echo " - Async handler support: $async" echo " - Make libasound.so symlink: $libasound" +echo " - Mark deprecated attribute: $markdeprecated" @@ -26,25 +26,25 @@ typedef struct _snd_config_update snd_config_update_t; extern snd_config_t *snd_config; -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_top(snd_config_t **config) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_load(snd_config_t *config, snd_input_t *in) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_load_override(snd_config_t *config, snd_input_t *in) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_save(snd_config_t *config, snd_output_t *out) { return -ENXIO; @@ -75,21 +75,21 @@ int snd_config_update_free_global(void) return 0; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_search(snd_config_t *config, const char *key, snd_config_t **result) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_searchv(snd_config_t *config, snd_config_t **result, ...) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_search_definition(snd_config_t *config, const char *base, const char *key, snd_config_t **result) @@ -97,7 +97,7 @@ int snd_config_search_definition(snd_config_t *config, return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_expand(snd_config_t *config, snd_config_t *root, const char *args, snd_config_t *private_data, snd_config_t **result) @@ -105,32 +105,32 @@ int snd_config_expand(snd_config_t *config, snd_config_t *root, return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_evaluate(snd_config_t *config, snd_config_t *root, snd_config_t *private_data, snd_config_t **result) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_add(snd_config_t *config, snd_config_t *leaf) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_delete(snd_config_t *config) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_delete_compound_members(const snd_config_t *config) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_config_copy(snd_config_t **dst, snd_config_t *src) { return -ENXIO; @@ -391,13 +391,13 @@ struct snd_devname { snd_devname_t *next; /**< Next pointer */ }; -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_names_list(const char *iface, snd_devname_t **list) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED void snd_names_list_free(snd_devname_t *list) { } diff --git a/src/ctl_macros.h b/src/ctl_macros.h index 6c72bff..3fadbd6 100644 --- a/src/ctl_macros.h +++ b/src/ctl_macros.h @@ -1128,21 +1128,21 @@ void snd_ctl_elem_value_set_iec958(snd_ctl_elem_value_t *obj, /* */ #if !SALSA_HAS_TLV_SUPPORT -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_ctl_elem_tlv_read(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id, unsigned int *tlv, unsigned int tlv_size) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_ctl_elem_tlv_write(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id, const unsigned int *tlv) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_ctl_elem_tlv_command(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id, const unsigned int *tlv) { @@ -1154,37 +1154,37 @@ int snd_ctl_elem_tlv_command(snd_ctl_t *ctl, const snd_ctl_elem_id_t *id, * not implemented yet */ -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_ctl_open_lconf(snd_ctl_t **ctlp, const char *name, int mode, snd_config_t *lconf) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_ctl_set_power_state(snd_ctl_t *ctl, unsigned int state) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_ctl_get_power_state(snd_ctl_t *ctl, unsigned int *state) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_device_name_hint(int card, const char *iface, void ***hints) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_device_name_free_hint(void **hints) { return 0; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED char *snd_device_name_get_hint(const void *hint, const char *id) { return NULL; @@ -1200,7 +1200,7 @@ snd_ctl_t *snd_async_handler_get_ctl(snd_async_handler_t *handler) #else -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_async_add_ctl_handler(snd_async_handler_t **handler, snd_ctl_t *ctl, snd_async_callback_t callback, void *private_data) @@ -1208,7 +1208,7 @@ int snd_async_add_ctl_handler(snd_async_handler_t **handler, snd_ctl_t *ctl, return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED snd_ctl_t *snd_async_handler_get_ctl(snd_async_handler_t *handler) { return NULL; diff --git a/src/global.h b/src/global.h index f33215f..1855972 100644 --- a/src/global.h +++ b/src/global.h @@ -42,6 +42,12 @@ typedef struct _snd_seq snd_seq_t; #define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) #endif +#if SALSA_MARK_DEPRECATED +#define __SALSA_NOT_IMPLEMENTED __attribute__ ((deprecated)) +#else +#define __SALSA_NOT_IMPLEMENTED +#endif + /* async helpers */ typedef struct _snd_async_handler snd_async_handler_t; typedef void (*snd_async_callback_t)(snd_async_handler_t *handler); @@ -69,13 +75,13 @@ int snd_async_del_handler(snd_async_handler_t *handler); #define snd_async_handler_get_signo(h) -1 #define snd_async_handler_get_fd(h) -1 #define snd_async_handler_get_callback_private(h) NULL -static inline __attribute__((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_async_add_handler(snd_async_handler_t **handler, int fd, snd_async_callback_t callback, void *private_data) { return -ENXIO; } -static inline __attribute__((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_async_del_handler(snd_async_handler_t *handler) { return -ENXIO; diff --git a/src/hctl_macros.h b/src/hctl_macros.h index bf52533..89ce389 100644 --- a/src/hctl_macros.h +++ b/src/hctl_macros.h @@ -243,7 +243,7 @@ snd_hctl_elem_t *snd_hctl_elem_prev(snd_hctl_elem_t *elem) * not implemented yet */ -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_hctl_async(snd_hctl_t *hctl, int sig, pid_t pid) { return -ENXIO; diff --git a/src/input.h b/src/input.h index 7d6e8dc..db8ff65 100644 --- a/src/input.h +++ b/src/input.h @@ -54,8 +54,9 @@ int snd_input_stdio_attach(snd_input_t **inputp, FILE *fp, int _close) #define snd_input_getc(input) getc(input) #define snd_input_ungetc(input,c) ungetc(c, input) -static inline __attribute__ ((deprecated)) -int snd_input_buffer_open(snd_input_t **inputp, const char *buffer, ssize_t size) +static inline __SALSA_NOT_IMPLEMENTED +int snd_input_buffer_open(snd_input_t **inputp, const char *buffer, + ssize_t size) { return -ENXIO; } diff --git a/src/mixer_macros.h b/src/mixer_macros.h index 6deff7e..ce7d38d 100644 --- a/src/mixer_macros.h +++ b/src/mixer_macros.h @@ -660,14 +660,14 @@ int snd_mixer_selem_set_capture_dB_all(snd_mixer_elem_t *elem, long value, } #else /* SALSA_HAS_TLV_SUPPORT */ -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_mixer_selem_get_playback_dB_range(snd_mixer_elem_t *elem, long *min, long *max) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_mixer_selem_get_playback_dB(snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long *value) @@ -675,7 +675,7 @@ int snd_mixer_selem_get_playback_dB(snd_mixer_elem_t *elem, return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_mixer_selem_set_playback_dB(snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long value, int dir) @@ -683,21 +683,21 @@ int snd_mixer_selem_set_playback_dB(snd_mixer_elem_t *elem, return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_mixer_selem_set_playback_dB_all(snd_mixer_elem_t *elem, long value, int dir) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_mixer_selem_get_capture_dB_range(snd_mixer_elem_t *elem, long *min, long *max) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_mixer_selem_get_capture_dB(snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long *value) @@ -705,7 +705,7 @@ int snd_mixer_selem_get_capture_dB(snd_mixer_elem_t *elem, return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_mixer_selem_set_capture_dB(snd_mixer_elem_t *elem, snd_mixer_selem_channel_id_t channel, long value, int dir) @@ -713,7 +713,7 @@ int snd_mixer_selem_set_capture_dB(snd_mixer_elem_t *elem, return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_mixer_selem_set_capture_dB_all(snd_mixer_elem_t *elem, long value, int dir) { diff --git a/src/output.h b/src/output.h index aa84d4f..1290a9c 100644 --- a/src/output.h +++ b/src/output.h @@ -53,13 +53,13 @@ int snd_output_stdio_attach(snd_output_t **outputp, FILE *fp, int _close) #define snd_output_putc(out, c) putc(c, out) #define snd_output_flush(out) fflush(out) -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_output_buffer_open(snd_output_t **outputp) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED size_t snd_output_buffer_string(snd_output_t *output, char **buf) { return 0; diff --git a/src/pcm_macros.h b/src/pcm_macros.h index dbbbdcc..bf6e546 100644 --- a/src/pcm_macros.h +++ b/src/pcm_macros.h @@ -2133,7 +2133,7 @@ void snd_pcm_info_set_stream(snd_pcm_info_t *obj, snd_pcm_stream_t val) * not implemented yet */ -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_pcm_open_lconf(snd_pcm_t **pcm, const char *name, snd_pcm_stream_t stream, int mode, snd_config_t *lconf) @@ -2141,28 +2141,28 @@ int snd_pcm_open_lconf(snd_pcm_t **pcm, const char *name, return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED snd_pcm_sframes_t snd_pcm_mmap_writei(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED snd_pcm_sframes_t snd_pcm_mmap_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED snd_pcm_sframes_t snd_pcm_mmap_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t size) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED snd_pcm_sframes_t snd_pcm_mmap_readn(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t size) { @@ -2179,7 +2179,7 @@ snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t *handler) #else /* !SALSA_HAS_ASYNC_SUPPORT */ -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_async_add_pcm_handler(snd_async_handler_t **handler, snd_pcm_t *pcm, snd_async_callback_t callback, void *private_data) @@ -2187,7 +2187,7 @@ int snd_async_add_pcm_handler(snd_async_handler_t **handler, snd_pcm_t *pcm, return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t *handler) { return NULL; diff --git a/src/rawmidi_macros.h b/src/rawmidi_macros.h index 40bdf83..2aa01ed 100644 --- a/src/rawmidi_macros.h +++ b/src/rawmidi_macros.h @@ -31,7 +31,7 @@ struct _snd_rawmidi { /* */ -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_rawmidi_open_lconf(snd_rawmidi_t **in_rmidi, snd_rawmidi_t **out_rmidi, const char *name, int mode, snd_config_t *lconf) { diff --git a/src/recipe.h.in b/src/recipe.h.in index 7de7393..4b9bf7b 100644 --- a/src/recipe.h.in +++ b/src/recipe.h.in @@ -7,4 +7,7 @@ /* Build with async support */ #define SALSA_HAS_ASYNC_SUPPORT @SALSA_HAS_ASYNC_SUPPORT@ +/* Enable deprecated attribute for non-working functions */ +#define SALSA_MARK_DEPRECATED @SALSA_MARK_DEPRECATED@ + #endif /* __ALSA_RECIPE_H */ @@ -24,13 +24,13 @@ typedef enum _snd_seq_type { /* */ -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_seq_open(snd_seq_t **handle, const char *name, int streams, int mode) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_seq_open_lconf(snd_seq_t **handle, const char *name, int streams, int mode, snd_config_t *lconf) { diff --git a/src/timer_macros.h b/src/timer_macros.h index 9e3eba4..d39ad62 100644 --- a/src/timer_macros.h +++ b/src/timer_macros.h @@ -524,59 +524,59 @@ long snd_timer_status_get_queue(snd_timer_status_t * status) /* * not implemented */ -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_timer_query_open(snd_timer_query_t **handle, const char *name, int mode) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_timer_query_open_lconf(snd_timer_query_t **handle, const char *name, int mode, snd_config_t *lconf) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_timer_query_close(snd_timer_query_t *handle) { return 0; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_timer_query_next_device(snd_timer_query_t *handle, snd_timer_id_t *tid) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_timer_query_info(snd_timer_query_t *handle, snd_timer_ginfo_t *info) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_timer_query_params(snd_timer_query_t *handle, snd_timer_gparams_t *params) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_timer_query_status(snd_timer_query_t *handle, snd_timer_gstatus_t *status) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_timer_open_lconf(snd_timer_t **handle, const char *name, int mode, snd_config_t *lconf) { return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED int snd_async_add_timer_handler(snd_async_handler_t **handler, snd_timer_t *timer, snd_async_callback_t callback, @@ -585,7 +585,7 @@ int snd_async_add_timer_handler(snd_async_handler_t **handler, return -ENXIO; } -static inline __attribute__ ((deprecated)) +static inline __SALSA_NOT_IMPLEMENTED snd_timer_t *snd_async_handler_get_timer(snd_async_handler_t *handler) { return NULL; |