Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #66810

Re: Programming openssl

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: Programming openssl
Date 2015-08-03 12:24 -0700
Organization None to speak of
Message-ID <lny4hsgops.fsf@kst-u.example.com> (permalink)
References <mpimqv$32d$1@ns2.nl2k.ab.ca> <55bce017.8665140@news.xs4all.nl> <lnvbcykbiu.fsf@kst-u.example.com> <55be93b8.1078968@news.xs4all.nl>

Show all headers | View raw


raltbos@xs4all.nl (Richard Bos) writes:
> Keith Thompson <kst-u@mib.org> wrote:
>> raltbos@xs4all.nl (Richard Bos) writes:
>> > doctor@doctor.nl2k.ab.ca (The Doctor) wrote:
>> >
>> >> getenv.o(.text+0x65): undefined reference to `environ'
>> >> getenv.o(.text+0x72): undefined reference to `environ'
>> >
>> >> What do I need to fix this problem?
>> >
>> > Build this program using an implementation which defines "environ". IIRC
>> > this is POSIX, but I may be wrong and it could be Ganuck; in any case,
>> > your code should use <unistd.h>, and I'm surprised that it doesn't
>> > already.
>> 
>> FYI, "Ganuck" is Richard's silly nickname for GNU.
>
> And I still don't know whether environ is GNUbile or POSIX, despite you
> and all other GNUheads being perfectly capable of adding that
> information.
>
> Embrace and extend, embrace and extend.

environ is defined by POSIX.
http://pubs.opengroup.org/onlinepubs/9699919799/functions/environ.html

Looking back at the original article, I'm not sure why you think the
OP's code needs to use <unistd.h>.  Environ is not declared in
<unistd.h>; you need to declare it yourself as:

    extern char **environ;

(I can't think of any good reason for that, but that's the way it is.)

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Programming openssl doctor@doctor.nl2k.ab.ca (The Doctor) - 2015-08-01 14:58 +0000
  Re: Programming openssl raltbos@xs4all.nl (Richard Bos) - 2015-08-01 15:08 +0000
    Re: Programming openssl Keith Thompson <kst-u@mib.org> - 2015-08-01 13:18 -0700
      Re: Programming openssl raltbos@xs4all.nl (Richard Bos) - 2015-08-02 22:04 +0000
        Re: Programming openssl Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-08-03 00:45 -0400
          Re: Programming openssl raltbos@xs4all.nl (Richard Bos) - 2015-08-04 11:51 +0000
        Re: Programming openssl Keith Thompson <kst-u@mib.org> - 2015-08-03 12:24 -0700
        Re: Programming openssl Noob <root@127.0.0.1> - 2015-08-07 23:12 +0200
          Re: Programming openssl raltbos@xs4all.nl (Richard Bos) - 2015-08-22 13:37 +0000
            Re: Programming openssl Noob <root@127.0.0.1> - 2015-08-22 18:20 +0200
              The evils of GNU Noob <root@127.0.0.1> - 2015-08-23 10:31 +0200
                Re: The evils of GNU jacobnavia <jacob@jacob.remcomp.fr> - 2015-08-23 11:22 +0200
                Re: The evils of GNU Bartc <bc@freeuk.com> - 2015-08-23 10:34 +0100
                Re: The evils of GNU David Kleinecke <dkleinecke@gmail.com> - 2015-08-23 19:24 -0700
            Re: Programming openssl Tim Rentsch <txr@alumni.caltech.edu> - 2015-09-06 13:34 -0700
  Re: Programming openssl Lőrinczy Zsigmond <nospam@for.me> - 2015-08-08 06:48 +0200

csiph-web