From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41892 invoked by alias); 30 May 2018 14:48:45 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 41260 invoked by uid 89); 30 May 2018 14:48:44 -0000 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 Received: from mail-wr0-f171.google.com (HELO mail-wr0-f171.google.com) (209.85.128.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 May 2018 14:48:42 +0000 Received: by mail-wr0-f171.google.com with SMTP id y15-v6so29826026wrg.11 for ; Wed, 30 May 2018 07:48:41 -0700 (PDT) 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 Received: by 2002:a1c:9a96:0:0:0:0:0 with HTTP; Wed, 30 May 2018 07:48:39 -0700 (PDT) From: Sam Habiel Date: Wed, 30 May 2018 16:55:00 -0000 Message-ID: Subject: Help with C clearenv and setenv To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg00323.txt.bz2 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