]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/openobex-apps/openobex-apps-1.0.0/gcc34.patch
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / openobex-apps / openobex-apps-1.0.0 / gcc34.patch
1 diff -Naur openobex-apps-1.0.0-clean/src/obex_put_common.c openobex-apps-1.0.0/src/obex_put_common.c
2 --- openobex-apps-1.0.0-clean/src/obex_put_common.c     2002-12-01 18:34:41.000000000 +0100
3 +++ openobex-apps-1.0.0/src/obex_put_common.c   2004-05-12 12:57:37.000000000 +0200
4 @@ -82,7 +82,7 @@
5                         break;
6                 
7                 default:
8 -                       printf(__FUNCTION__ "() Skipped header %02x\n", hi);
9 +                       printf("%s() Skipped header %02x\n", __func__,  hi);
10                 }
11         }
12         if(!body)       {
13 @@ -123,7 +123,7 @@
14                 OBEX_ObjectSetRsp(object, OBEX_RSP_SUCCESS, OBEX_RSP_SUCCESS);
15                 break;
16         default:
17 -               printf(__FUNCTION__ "() Denied %02x request\n", cmd);
18 +               printf("%s() Denied %02x request\n", __func__,  cmd);
19                 OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
20                 break;
21         }
22 diff -Naur openobex-apps-1.0.0-clean/src/obex_test_cable.h openobex-apps-1.0.0/src/obex_test_cable.h
23 --- openobex-apps-1.0.0-clean/src/obex_test_cable.h     2002-12-01 18:34:41.000000000 +0100
24 +++ openobex-apps-1.0.0/src/obex_test_cable.h   2004-05-12 13:23:11.000000000 +0200
25 @@ -1,16 +1,16 @@
26  /*********************************************************************
27 - *                
28 + *
29   * Filename:      obex_test_cable.h
30 - * Version:       
31 - * Description:   
32 + * Version:
33 + * Description:
34   * Status:        Experimental.
35   * Author:        Pontus Fuchs <pontus.fuchs@tactel.se>
36   * Created at:    Wed Nov 17 22:05:16 1999
37   * Modified at:   Sun Aug 13 10:55:20 PM CEST 2000
38   * Modified by:   Pontus Fuchs <pontus.fuchs@tactel.se>
39 - * 
40 + *
41   *     Copyright (c) 1999, 2000 Pontus Fuchs, All Rights Reserved.
42 - *      
43 + *
44   *     This library is free software; you can redistribute it and/or
45   *     modify it under the terms of the GNU Lesser General Public
46   *     License as published by the Free Software Foundation; either
47 @@ -23,9 +23,9 @@
48   *
49   *     You should have received a copy of the GNU Lesser General Public
50   *     License along with this library; if not, write to the Free Software
51 - *     Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
52 + *     Foundation, Inc., 59 Temple Place, Suite 330, Boston,
53   *     MA  02111-1307  USA
54 - *     
55 + *
56   ********************************************************************/
57  
58  #ifndef OBEX_TEST_CABLE_H
59 @@ -38,7 +38,7 @@
60  #include <openobex/obex.h>
61  
62  #ifdef CABLE_DEBUG
63 -#define CDEBUG(args...) printf(__FUNCTION__ "() " args)
64 +#define CDEBUG(args...) printf("%s() ", __func__, args)
65  #else
66  #define CDEBUG(args...)
67  #endif
68 diff -Naur openobex-apps-1.0.0-clean/src/obex_test_cable.h~ openobex-apps-1.0.0/src/obex_test_cable.h~
69 --- openobex-apps-1.0.0-clean/src/obex_test_cable.h~    1970-01-01 01:00:00.000000000 +0100
70 +++ openobex-apps-1.0.0/src/obex_test_cable.h~  2004-05-12 13:22:48.000000000 +0200
71 @@ -0,0 +1,66 @@
72 +/*********************************************************************
73 + *
74 + * Filename:      obex_test_cable.h
75 + * Version:
76 + * Description:
77 + * Status:        Experimental.
78 + * Author:        Pontus Fuchs <pontus.fuchs@tactel.se>
79 + * Created at:    Wed Nov 17 22:05:16 1999
80 + * Modified at:   Sun Aug 13 10:55:20 PM CEST 2000
81 + * Modified by:   Pontus Fuchs <pontus.fuchs@tactel.se>
82 + *
83 + *     Copyright (c) 1999, 2000 Pontus Fuchs, All Rights Reserved.
84 + *
85 + *     This library is free software; you can redistribute it and/or
86 + *     modify it under the terms of the GNU Lesser General Public
87 + *     License as published by the Free Software Foundation; either
88 + *     version 2 of the License, or (at your option) any later version.
89 + *
90 + *     This library is distributed in the hope that it will be useful,
91 + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
92 + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
93 + *     Lesser General Public License for more details.
94 + *
95 + *     You should have received a copy of the GNU Lesser General Public
96 + *     License along with this library; if not, write to the Free Software
97 + *     Foundation, Inc., 59 Temple Place, Suite 330, Boston,
98 + *     MA  02111-1307  USA
99 + *
100 + ********************************************************************/
101 +
102 +#ifndef OBEX_TEST_CABLE_H
103 +#define OBEX_TEST_CABLE_H
104 +
105 +#define CABLE_DEBUG 1
106 +
107 +
108 +#include <termios.h>
109 +#include <openobex/obex.h>
110 +
111 +#ifdef CABLE_DEBUG
112 +#define CDEBUG(args...) printf("%s() " __func__, args)
113 +#else
114 +#define CDEBUG(args...)
115 +#endif
116 +
117 +struct cobex_context
118 +{
119 +       const char *portname;
120 +       int ttyfd;
121 +       char inputbuf[500];
122 +       struct termios oldtio, newtio;
123 +       int r320;
124 +};
125 +
126 +/* User function */
127 +struct cobex_context *cobex_open(const char *port, int r320);
128 +void cobex_close(struct cobex_context *gt);
129 +int cobex_do_at_cmd(struct cobex_context *gt, char *cmd, char *rspbuf, int rspbuflen, int timeout);
130 +
131 +/* Callbacks */
132 +int cobex_handle_input(obex_t *handle, void * userdata, int timeout);
133 +int cobex_write(obex_t *self, void * userdata, uint8_t *buffer, int length);
134 +int cobex_connect(obex_t *handle, void * userdata);
135 +int cobex_disconnect(obex_t *handle, void * userdata);
136 +
137 +#endif
138 diff -Naur openobex-apps-1.0.0-clean/src/obex_test_client.c openobex-apps-1.0.0/src/obex_test_client.c
139 --- openobex-apps-1.0.0-clean/src/obex_test_client.c    2002-12-01 18:34:41.000000000 +0100
140 +++ openobex-apps-1.0.0/src/obex_test_client.c  2004-05-12 13:07:24.000000000 +0200
141 @@ -370,13 +370,13 @@
142  
143         while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))        {
144                 if(hi == OBEX_HDR_BODY) {
145 -               printf(__FUNCTION__ "() Found body\n");
146 +               printf("%s() Found body\n", __func__);
147                         body = hv.bs;
148                         body_len = hlen;
149                         break;
150                 }
151                 else    {
152 -                       printf(__FUNCTION__ "() Skipped header %02x\n", hi);
153 +                       printf("%s() Skipped header %02x\n", __func__,  hi);
154                 }
155         }
156  
157 diff -Naur openobex-apps-1.0.0-clean/src/obex_test_server.c openobex-apps-1.0.0/src/obex_test_server.c
158 --- openobex-apps-1.0.0-clean/src/obex_test_server.c    2002-12-01 18:34:41.000000000 +0100
159 +++ openobex-apps-1.0.0/src/obex_test_server.c  2004-05-12 13:07:33.000000000 +0200
160 @@ -54,17 +54,17 @@
161         char *name = NULL;
162         char *namebuf = NULL;
163  
164 -       printf(__FUNCTION__ "()\n");
165 +       printf("%s()\n", __func__);
166  
167         while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))        {
168                 switch(hi)      {
169                 case OBEX_HDR_BODY:
170 -                       printf(__FUNCTION__ "() Found body\n");
171 +                       printf("%s() Found body\n", __func__);
172                         body = hv.bs;
173                         body_len = hlen;
174                         break;
175                 case OBEX_HDR_NAME:
176 -                       printf(__FUNCTION__ "() Found name\n");
177 +                       printf("%s() Found name\n", __func__);
178                         if( (namebuf = malloc(hlen / 2)))       {
179                                 OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
180                                 name = namebuf;
181 @@ -72,7 +72,7 @@
182                         break;
183                 
184                 default:
185 -                       printf(__FUNCTION__ "() Skipped header %02x\n", hi);
186 +                       printf("%s() Skipped header %02x\n", __func__,  hi);
187                 }
188         }
189         if(!body)       {
190 @@ -103,12 +103,12 @@
191         char *name = NULL;
192         char *namebuf = NULL;
193  
194 -       printf(__FUNCTION__ "()\n");
195 +       printf("%s()\n", __func__);
196  
197         while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))        {
198                 switch(hi)      {
199                 case OBEX_HDR_NAME:
200 -                       printf(__FUNCTION__ "() Found name\n");
201 +                       printf("%s() Found name\n", __func__);
202                         if( (namebuf = malloc(hlen / 2)))       {
203                                 OBEX_UnicodeToChar(namebuf, hv.bs, hlen);
204                                 name = namebuf;
205 @@ -116,16 +116,16 @@
206                         break;
207                 
208                 default:
209 -                       printf(__FUNCTION__ "() Skipped header %02x\n", hi);
210 +                       printf("%s() Skipped header %02x\n", __func__,  hi);
211                 }
212         }
213  
214         if(!name)       {
215 -               printf(__FUNCTION__ "() Got a GET without a name-header!\n");
216 +               printf("%s() Got a GET without a name-header!\n", __func__);
217                 OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_FOUND, OBEX_RSP_NOT_FOUND);
218                 return;
219         }
220 -       printf(__FUNCTION__ "() Got a request for %s\n", name);
221 +       printf("%s() Got a request for %s\n", __func__,  name);
222  
223         buf = easy_readfile(name, &file_size);
224         if(buf == NULL) {
225 @@ -154,7 +154,7 @@
226  
227         const uint8_t *who = NULL;
228         int who_len = 0;
229 -       printf(__FUNCTION__ "()\n");
230 +       printf("%s()\n", __func__);
231  
232         while(OBEX_ObjectGetNextHeader(handle, object, &hi, &hv, &hlen))        {
233                 if(hi == OBEX_HDR_WHO)  {
234 @@ -162,7 +162,7 @@
235                         who_len = hlen;
236                 }
237                 else    {
238 -                       printf(__FUNCTION__ "() Skipped header %02x\n", hi);
239 +                       printf("%s() Skipped header %02x\n", __func__,  hi);
240                 }
241         }
242         if (who_len == 6)       {
243 @@ -199,7 +199,7 @@
244                 OBEX_ObjectSetRsp(object, OBEX_RSP_CONTINUE, OBEX_RSP_SUCCESS);
245                 break;
246         default:
247 -               printf(__FUNCTION__ "() Denied %02x request\n", cmd);
248 +               printf("%s() Denied %02x request\n", __func__,  cmd);
249                 OBEX_ObjectSetRsp(object, OBEX_RSP_NOT_IMPLEMENTED, OBEX_RSP_NOT_IMPLEMENTED);
250                 break;
251         }
252 @@ -224,7 +224,7 @@
253                 break;
254  
255         default:
256 -               printf(__FUNCTION__ "() Command (%02x) has now finished\n", obex_cmd);
257 +               printf("%s() Command (%02x) has now finished\n", __func__,  obex_cmd);
258                 break;
259         }
260  }