delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/05/30/10:49:40

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type; q=dns; s=default; b=Atgs3V+JsSesQWJ/V+x9keMNLQw69
QQkIhdfBA+xTU8hL5SOpLBE2VkDh4maCkYCtaf392HWFDn5I26CKZOWqOlb2cGvJ
zcfh3bWuNMrBWiBDWHPLbTfhE1HWoQ2n/9PlDRdu7eOXaNt04QGfbnxdvab9cdLz
og6Si3is/siM2o=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type; s=default; bh=aeZ2wFaQjWDN5P2/03IhSzN4y9U=; b=OwM
05uJ87XJVABKshg6D3rSWclS/3Yh5T444fS6QvJqnqJ5cy3R2qC6OY0/19auvFrd
KVdFurN99o0ywd5xUwkGiH7PYoE4Twr8rGBoY12e+ubrHme3HOeq4mNzSHyj+jNs
RtvdghK0XItp0djOGZHSAHyrp1Ax3RfGPuU9kcVY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:415
X-HELO: mail-wr0-f171.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=f8yOTR+Hk8ubfAzBaZ55GmpH4xXMYWzyfAFLblF+nXE=; b=ZPXvSkE3hmfejf1vXiE7at7unE8g3GTbQdppmnkJkARqk3wnj+cvfJ5sa8fuvVgPfC hrVJ/Z0WkOkdUnJjvN3lmwve/XIN5NZRDdJTIwMSFj5i5jjOq2EnqNh0DjYQsLBDKRV8 EFW1ho2qZS/iqfoYTUzsIKUFZ+Szma8cs/eeGZoBaGTtT0077J1riFbZD3zcBSOaS0n9 EI9PG0IzXfKFLQk3yraAFz0tw8CBTOcQWpKq/esvCNO4x0xUOhloyw1cfgB5mhIIa41c skdaerEFiJRn9X4TiLTIBhLiLZWiBGS3TWESsMR6EEithg/YQOAdjilYWelAnyzGwqTp PLKA==
X-Gm-Message-State: ALKqPweVcGj8QzD6odCHh7VQmszc+FanxR0/yCo01yxmp0rCYTFeXh0Y MKIF+cT9ZvkL921IKExG5AQqVZL3ATgP4O7xIC0CsWd6
X-Google-Smtp-Source: ADUXVKIeDR1/0ZPhsZm8b67nDTdsWxeLW/aTao2McSitf308/IO4d1G/rHAvU3usquCAm5aV+UyZxkykk9gQmpm9amM=
X-Received: by 2002:adf:ea44:: with SMTP id j4-v6mr2402735wrn.224.1527691720004; Wed, 30 May 2018 07:48:40 -0700 (PDT)
MIME-Version: 1.0
From: Sam Habiel <sam DOT habiel AT gmail DOT com>
Date: Wed, 30 May 2018 10:48:39 -0400
Message-ID: <CABHT962nB5jK2sNP9jGaVEbWGrvD72hBVN_q6xX9TKuq3yQ0Gg@mail.gmail.com>
Subject: Help with C clearenv and setenv
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

I have code for a database I am porting to Cygwin.

Part of that code is a clearenv() then a couple of setenvs. There is
an ifdef for Cygwin, as it doesn't implement clearenv. It just sets
environ = NULL. Well--that really breaks setenv! It returns a "Bad
Poniter" error (-1).

What is the correct way to clear environment variables in Cygwin?

--Sam
(About me: http://smh101.com/)

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019