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:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id :references:to; q=dns; s=default; b=QnivA1Wco52mpgfuPLCQKyX/RIct PmzA/noomK/F7IqnHpWxjVsnHO/X3hByW/Kxxm62xcEBsJhrTpBEGOZvMwkBsX1l z8SCbRvOxLeiIvPVTSvRVOloZtxkCk7VjRaO0rcgAPKe0KXBX3A/6LUqbe8c7WPg 6iR1yc6JspiJ+40= 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:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id :references:to; s=default; bh=I3NUNw0cT83vFmMIamqV8nybKzw=; b=bQ 2ycLtx+o491ugrkiFogxaVaUXyoSOVL2d5ZOBiHu4WnqTw5SHgIb1P50oWZBqhLm 0bFdIyz2uxi1ezfnQLC2AXUeoI8gKEPtJFgdA4W/IT6VioyjoAOR2haOv4WfrE6J EVIkCjXoLYgY3pWLJ6qHTODsLBnBB0PgwVDCCVFys= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: etr-usa.com Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: Error accessing mapped drive >2TB? From: Warren Young In-Reply-To: <0F9378A1-6890-42CE-BD19-578167F116AA@etr-usa.com> Date: Fri, 23 Oct 2015 16:36:33 -0600 Message-Id: References: <712A87EA-64C7-4033-BE7F-39C8C8D527EB AT etr-usa DOT com> <20151021100328 DOT GL5319 AT calimero DOT vinschen DOT de> <20151021162254 DOT GC19868 AT calimero DOT vinschen DOT de> <169BF9F6-FF26-4073-9CC4-786882EFBAE9 AT etr-usa DOT com> <20151022083446 DOT GW5319 AT calimero DOT vinschen DOT de> <20151023092007 DOT GF5319 AT calimero DOT vinschen DOT de> <0F9378A1-6890-42CE-BD19-578167F116AA AT etr-usa DOT com> To: cygwin AT cygwin DOT com X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t9NMal0X002001 On Oct 23, 2015, at 4:04 PM, Warren Young wrote: > > I’ve made the suggested changes to the program, here: > > http://pastebin.com/uZdDZPgi By the way, if you look at scream_and_die() and wonder why I’ve badly overcomplicated it, it’s because a previous version presented a printf-like interface to its callers. In stages, the callers stopped using it that way, and the function itself evolved to where it couldn’t do printf-like things anyway. This simpler replacement suffices now: void scream_and_die(const char* complaint) { LPTSTR syserr = 0; FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, 0, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&syserr, 0, 0); fprintf(stderr, "%s: %s (0x%x)\n", complaint, syserr, GetLastError()); exit(1); } -- 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