helpGNU libunistring - Support: sr #107401, make check unsetenv problem on OSF...

 
 

sr #107401: make check unsetenv problem on OSF 5.1

Submitted by:  None
Submitted on:  Wed 09 Jun 2010 04:52:22 PM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 2 - MinorStatus: Need Info
Privacy: PublicAssigned to: Bruno Haible <haible>
Originator Email: -unavailable-Open/Closed: Open
Operating System: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 13 Jun 2010 05:48:48 PM UTC, comment #1:

It's not clear to me where the error comes from. OSF/1 5.1
systems do declare the unsetenv() function, but they do so
with return type 'void' instead of 'int'.

You should see the following:
$ grep UNSETENV config.status
S["REPLACE_UNSETENV"]="1"
S["HAVE_UNSETENV"]="1"
S["GNULIB_UNSETENV"]="IN_LIBUNISTRING_GNULIB_TESTS"
D["HAVE_RAW_DECL_UNSETENV"]=" 1"
D["HAVE_UNSETENV"]=" 1"
D["VOID_UNSETENV"]=" 1"
D["GNULIB_TEST_UNSETENV"]=" 1"

The section dealing with unsetenv in lib/stdlib.h should look
like this:

#if IN_LIBUNISTRING_GNULIB_TESTS
/* Remove the variable NAME from the environment. */
# if 1
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef unsetenv
# define unsetenv rpl_unsetenv
# endif
_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (unsetenv, int, (const char *name));
# else
# if !1
_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (unsetenv, int, (const char *name));
# endif
_GL_CXXALIASWARN (unsetenv);
...

Therefore it is unclear to me how you can get an error message
"test-unsetenv.c:24: error: 'unsetenv' undeclared here (not in a function)"

Btw, this error message comes from a gcc. Can you
1) show the result of gcc --version?
2) try to compile with CC=cc, assuming you have a cc compiler
installed?

Bruno Haible <haible>
Project AdministratorIn charge of this item.
Wed 09 Jun 2010 04:52:22 PM UTC, original submission:

make check

/home/jayk/src/libunistring-0.9.3/tests/test-unsetenv.c:24: error: 'unsetenv' undeclared here (not in a function)

/usr/include/stdlib.h:

#ifdef _BSD
/*

  • The following prototypes are included to provide support
  • for legacy applications that require BSD 4.3 interfaces.

*

  • NEW DEVELOPMENT USE OF THESE INTERFACES IS DISCOURAGED!!

*/
extern int setenv __((const char , const char , int));
extern void unsetenv __((const char *));
#endif /* _BSD */

I'd be reluctant to #define _BSD, it could have other affects.

bash-4.1$ uname -a
OSF1 removed V5.1 732 alpha

Notice that the return type is different.
I see it is in Posix.
http://www.opengroup.org/onlinepubs/009695399/functions/unsetenv.html
Oh well. I gave up.

- Jay

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by haible (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 Jun 2010 05:48:48 PM UTChaibleStatusNone=>Need Info
      Assigned toNone=>haible

    Back to the top


    Powered by Savane 3.1-cleanup