select: Rename BSC_FD_* constants to OSMO_FD_*
The naming of these constants dates back to when the code was private
within OpenBSC. Everything else was renamed (bsc_fd -> osmo_fd) at
the time, but somehow the BSC_FD_* defines have been missed at the
time.
Keep compatibility #defines around, but allow us to migrate the
applications to a less confusing naming meanwhile.
Change-Id: Ifae33ed61a7cf0ae54ad487399e7dd2489986436
diff --git a/include/osmocom/core/select.h b/include/osmocom/core/select.h
index 1ba6b83..e4787b0 100644
--- a/include/osmocom/core/select.h
+++ b/include/osmocom/core/select.h
@@ -13,11 +13,16 @@
* \file select.h */
/*! Indicate interest in reading from the file descriptor */
-#define BSC_FD_READ 0x0001
+#define OSMO_FD_READ 0x0001
/*! Indicate interest in writing to the file descriptor */
-#define BSC_FD_WRITE 0x0002
+#define OSMO_FD_WRITE 0x0002
/*! Indicate interest in exceptions from the file descriptor */
-#define BSC_FD_EXCEPT 0x0004
+#define OSMO_FD_EXCEPT 0x0004
+
+/* legacy naming dating back to early OpenBSC / bsc_hack of 2008 */
+#define BSC_FD_READ OSMO_FD_READ
+#define BSC_FD_WRITE OSMO_FD_WRITE
+#define BSC_FD_EXCEPT OSMO_FD_EXCEPT
/*! Structure representing a file dsecriptor */
struct osmo_fd {
@@ -25,8 +30,8 @@
struct llist_head list;
/*! actual operating-system level file decriptor */
int fd;
- /*! bit-mask or of \ref BSC_FD_READ, \ref BSC_FD_WRITE and/or
- * \ref BSC_FD_EXCEPT */
+ /*! bit-mask or of \ref OSMO_FD_READ, \ref OSMO_FD_WRITE and/or
+ * \ref OSMO_FD_EXCEPT */
unsigned int when;
/*! call-back function to be called once file descriptor becomes
* available */