]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Removed extraordinary use of inline keyword in functions declarations.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 14 May 2009 00:19:34 +0000 (02:19 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 14 May 2009 00:19:34 +0000 (02:19 +0200)
The use of inline for functions implemented in C source
file and included in library breaks C99/GNU99 build with
FFMpeg library.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
fwp/lib/fwp/fwp_msgb.c
fwp/lib/fwp/fwp_msgb.h
fwp/lib/fwp/fwp_utils.c
fwp/lib/fwp/fwp_utils.h

index 77143a2fc402cb77c427f0f38756dafa88bca97c..c5193c76f75df22b9193ee9ffb70db113ac10be3 100644 (file)
@@ -103,7 +103,7 @@ void fwp_msgb_free(struct fwp_msgb *msgb)
  * \return Previous tail pointer
  *
  */
-inline unsigned char* fwp_msgb_put(struct fwp_msgb *msgb, unsigned int len)
+unsigned char* fwp_msgb_put(struct fwp_msgb *msgb, unsigned int len)
 {
        unsigned char *tmp= msgb->tail;
        
@@ -121,7 +121,7 @@ inline unsigned char* fwp_msgb_put(struct fwp_msgb *msgb, unsigned int len)
  * \return Previous tail pointer on NULL in case of lack of space in the buffer.
  *
  */
-inline unsigned char* fwp_msgb_pull(struct fwp_msgb *msgb, unsigned int len)
+unsigned char* fwp_msgb_pull(struct fwp_msgb *msgb, unsigned int len)
 {
        if (len > msgb->len)
                return NULL;
@@ -139,14 +139,14 @@ inline unsigned char* fwp_msgb_pull(struct fwp_msgb *msgb, unsigned int len)
  * \return Current data pointer
  *
  */ 
-inline unsigned char* fwp_msgb_push(struct fwp_msgb* msgb, unsigned int len)
+unsigned char* fwp_msgb_push(struct fwp_msgb* msgb, unsigned int len)
 {
        msgb->data-=len;
        msgb->len+=len;
        return msgb->data;
 }
 
-inline unsigned char* fwp_msgb_shift(struct fwp_msgb *msgb, unsigned int len)
+unsigned char* fwp_msgb_shift(struct fwp_msgb *msgb, unsigned int len)
 {
        if (msgb->data + len > msgb->tail)
                return NULL;
@@ -160,7 +160,7 @@ inline unsigned char* fwp_msgb_shift(struct fwp_msgb *msgb, unsigned int len)
  * \param msgb Pointer to msgb
  *
  */
-inline void fwp_msgb_reset_data_pointer(struct fwp_msgb *msgb)
+void fwp_msgb_reset_data_pointer(struct fwp_msgb *msgb)
 {
        msgb->data = (unsigned char*) msgb + sizeof(struct fwp_msgb);
 }
@@ -170,7 +170,7 @@ inline void fwp_msgb_reset_data_pointer(struct fwp_msgb *msgb)
  *
  * \param msgb Pointer to msgb
  */
-inline void fwp_msgb_reset_data(struct fwp_msgb* msgb)
+void fwp_msgb_reset_data(struct fwp_msgb* msgb)
 {
        msgb->len = 0;
        msgb->data = (unsigned char*) msgb + sizeof(struct fwp_msgb);
@@ -183,7 +183,7 @@ inline void fwp_msgb_reset_data(struct fwp_msgb* msgb)
  * \param msgb Pointer to msgb
  * \param len The lenght data 
  */
-inline void fwp_msgb_reserve(fwp_msgb_t *msgb, unsigned int len)
+void fwp_msgb_reserve(fwp_msgb_t *msgb, unsigned int len)
 {
        msgb->data+=len;
        msgb->tail+=len;
index a49d884121792eff812e59d94d7d779176119039..95b683d4ae4ae82770084e2bf06bba05939047d6 100644 (file)
@@ -74,13 +74,13 @@ struct fwp_msgb {
 struct fwp_msgb* fwp_msgb_alloc(size_t buf_size);
 void fwp_msgb_free(struct fwp_msgb* msgb);
 
-inline unsigned char* fwp_msgb_put(struct fwp_msgb *msgb, unsigned int len);
-inline unsigned char* fwp_msgb_pull(struct fwp_msgb *msgb, unsigned int len);
-inline unsigned char* fwp_msgb_push(struct fwp_msgb* msgb, unsigned int len);
-inline void fwp_msgb_reset_data_pointer(struct fwp_msgb* msgb);
-inline void fwp_msgb_reset_data(struct fwp_msgb* msgb);
-inline unsigned char* fwp_msgb_shift(struct fwp_msgb* msgb, unsigned int len);
-inline void fwp_msgb_reserve(fwp_msgb_t *msgb, unsigned int len);
+unsigned char* fwp_msgb_put(struct fwp_msgb *msgb, unsigned int len);
+unsigned char* fwp_msgb_pull(struct fwp_msgb *msgb, unsigned int len);
+unsigned char* fwp_msgb_push(struct fwp_msgb* msgb, unsigned int len);
+void fwp_msgb_reset_data_pointer(struct fwp_msgb* msgb);
+void fwp_msgb_reset_data(struct fwp_msgb* msgb);
+unsigned char* fwp_msgb_shift(struct fwp_msgb* msgb, unsigned int len);
+void fwp_msgb_reserve(fwp_msgb_t *msgb, unsigned int len);
 
 /*struct fwp_socketaddr* fwp_socket_create(struct sockaddr *_addr, socklen_t _addrlen);
 inline void fwp_socket_set(struct fwp_socketaddr *fwpsock, struct sockaddr *_addr, 
index 28ef3abf04ed0693db35db1062e8bc396136c0a1..83f61066e8cec445a7f828de594e83eeb39ffa59 100644 (file)
@@ -54,7 +54,7 @@ const char *ac_to_text[4] = {[AC_VO] = "AC_VO", [AC_VI] = "AC_VI",
                             [AC_BE] = "AC_BE", [AC_BK] = "AC_BK", };
 */
 
-inline void fwp_timespec_add (struct timespec *sum, const struct timespec *left,
+void fwp_timespec_add (struct timespec *sum, const struct timespec *left,
              const struct timespec *right)
 {
        sum->tv_sec = left->tv_sec + right->tv_sec;
@@ -66,7 +66,7 @@ inline void fwp_timespec_add (struct timespec *sum, const struct timespec *left,
        }
 }
 
-inline void fwp_timespec_sub (struct timespec *diff, const struct timespec *left,
+void fwp_timespec_sub (struct timespec *diff, const struct timespec *left,
              const struct timespec *right)
 {
        diff->tv_sec = left->tv_sec - right->tv_sec;
index c99ec65fdbc13d66f34dda5250f4424615e26926..3a12946913185320331ed1e1d80ebc33d60c3e56 100644 (file)
@@ -128,9 +128,9 @@ _fwp_recv(int s, void *buf, size_t len, int flags)
        return ret;
 }
 
-inline void fwp_timespec_add (struct timespec *sum, const struct timespec *left, 
+void fwp_timespec_add (struct timespec *sum, const struct timespec *left, 
                                const struct timespec *right);
-inline void fwp_timespec_sub (struct timespec *diff, const struct timespec *left,
+void fwp_timespec_sub (struct timespec *diff, const struct timespec *left,
                                const struct timespec *right);
 void fwp_timespec_modulo(struct timespec *dividend, struct timespec *dividor,
                                struct timespec *remainder);