Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

apps compiling fails

Help
gotaserena
2005-02-23
2013-05-01
  • gotaserena
    gotaserena
    2005-02-23

    I must be doing something stupid, but I'd appreciate any help here.

    I'm using gentoo 2.6.10 on a thinkpad laptop. I'm using IrDA to connect to my nokia 6600. I can emerge openobex without any problems, but compiling of openobex-apps fails with:
    --
    gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include     -g -O2 -c obex_put_common.c
    obex_put_common.c: In function `put_done':
    obex_put_common.c:85: error: parse error before string constant
    obex_put_common.c: In function `server_request':
    obex_put_common.c:126: error: parse error before string constant
    make[2]: *** [obex_put_common.o] Error 1
    --
    I've searched around and found nothing that could help me. I've inspected the code and apparently ./configure is not setting some variables (like __FUNCTION__ and CDEBUG).

    Anybody has any ideas on how I might be able to solve this?

     
    • gotaserena
      gotaserena
      2005-02-23

      Hate to answer my own questions but the problem is quite old. I've google around and found out that there are problems in some of the source files. Here's a patch in case someone runs into this again:

      --
      diff -r openobex/apps/src/obex_put_common.c apps/src/obex_put_common.c
      85c85
      <                       printf(__FUNCTION__ "() Skipped header %02x\n", hi);
      ---
      >                       printf("%s() Skipped header %02x\n", __func__, hi);
      126c126
      <               printf(__FUNCTION__ "() Denied %02x request\n", cmd);
      ---
      >               printf("%s() Denied %02x request\n", __func__, cmd);
      diff -r openobex/apps/src/obex_test_cable.h apps/src/obex_test_cable.h
      41c41
      < #define CDEBUG(args...) printf(__FUNCTION__ "() " args)
      ---
      > #define CDEBUG(args...) { printf("%s() ", __func__); printf(args); }
      diff -r openobex/apps/src/obex_test_client.c apps/src/obex_test_client.c
      373c373
      <               printf(__FUNCTION__ "() Found body\n");
      ---
      >               printf("%s() Found body\n", __func__);
      379c379
      <                       printf(__FUNCTION__ "() Skipped header %02x\n", hi);
      ---
      >                       printf("%s() Skipped header %02x\n", __func__, hi);
      diff -r openobex/apps/src/obex_test_server.c apps/src/obex_test_server.c
      57c57
      <       printf(__FUNCTION__ "()\n");
      ---
      >       printf("%s()\n", __func__);
      62c62
      <                       printf(__FUNCTION__ "() Found body\n");
      ---
      >                       printf("%s() Found body\n", __func__);
      67c67
      <                       printf(__FUNCTION__ "() Found name\n");
      ---
      >                       printf("%s() Found name\n", __func__);
      75c75
      <                       printf(__FUNCTION__ "() Skipped header %02x\n", hi);
      ---
      >                       printf("%s() Skipped header %02x\n", __func__, hi);
      106c106
      <       printf(__FUNCTION__ "()\n");
      ---
      >       printf("%s()\n", __func__);
      111c111
      <                       printf(__FUNCTION__ "() Found name\n");
      ---
      >                       printf("%s() Found name\n", __func__);
      119c119
      <                       printf(__FUNCTION__ "() Skipped header %02x\n", hi);
      ---
      >                       printf("%s() Skipped header %02x\n", __func__, hi);
      124c124
      <               printf(__FUNCTION__ "() Got a GET without a name-header!\n");
      ---
      >               printf("%s() Got a GET without a name-header!\n", __func__);
      128c128
      <       printf(__FUNCTION__ "() Got a request for %s\n", name);
      ---
      >       printf("%s() Got a request for %s\n", __func__, name);
      157c157
      <       printf(__FUNCTION__ "()\n");
      ---
      >       printf("%s()\n", __func__);
      165c165
      <                       printf(__FUNCTION__ "() Skipped header %02x\n", hi);
      ---
      >                       printf("%s() Skipped header %02x\n", __func__, hi);
      202c202
      <               printf(__FUNCTION__ "() Denied %02x request\n", cmd);
      ---
      >               printf("%s() Denied %02x request\n", __func__, cmd);
      227c227
      <               printf(__FUNCTION__ "() Command (%02x) has now finished\n", obex_cmd);
      ---
      >               printf("%s() Command (%02x) has now finished\n", __func__, obex_cmd);