Re: libedit and g++

From: Simon Barner (barner_at_in.tum.de)
Date: 07/14/03

  • Next message: Kai Mosebach: "geteuid hangs in sigsuspend"
    Date: Mon, 14 Jul 2003 01:41:27 +0200
    To: Priit Piipuu <priit.piipuu@mail.ee>
    
    
    

    Hi,

    > > cat test.c
    > #include <stdio.h>
    > #include <histedit.h>
    >

    It will link, when you wrap the include with an extern "C" statement:

    extern "C" {
            #include <histedit.h>
    }

    This should probably by handled by the library header itself, here is a
    patch:

    --- histedit.h.orig Mon Jul 14 01:37:43 2003
    +++ histedit.h Mon Jul 14 01:38:33 2003
    @@ -48,6 +48,10 @@
     #include <sys/types.h>
     #include <stdio.h>
     
    +#ifdef __cplusplus
    +extern "C" {
    +#endif
    +
     /*
      * ==== Editing ====
      */
    @@ -178,5 +182,9 @@
     #define H_LOAD 14 /* , const char *); */
     #define H_SAVE 15 /* , const char *); */
     #define H_CLEAR 16 /* , void); */
    +
    +#ifdef __cplusplus
    +}
    +#endif
     
     #endif /* _h_editline */

    
    



  • Next message: Kai Mosebach: "geteuid hangs in sigsuspend"

    Relevant Pages