From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18175 invoked by alias); 17 Jul 2013 01:16:34 -0000 Mailing-List: contact pthreads-win32-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sourceware.org Received: (qmail 18146 invoked by uid 89); 17 Jul 2013 01:16:33 -0000 X-Spam-SWARE-Status: No, score=-4.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_PASS,TW_CP,TW_QY autolearn=no version=3.3.1 Received: from Unknown (HELO icp-osb-irony-out3.external.iinet.net.au) (203.59.1.219) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Jul 2013 01:16:31 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgcFAP7u5VHKN5wE/2dsb2JhbAA/GoMGNMJngRAWdIIjAQEFJxEbJRELDQsJFg8JAwIBAgE3AQ0TCAEBiAsNM7URj3UWg2QDmQWEeiODXIcrgyQ Received: from unknown (HELO mail03.grapevine.net.au) ([202.55.156.4]) by icp-osb-irony-out3.iinet.net.au with ESMTP; 17 Jul 2013 09:16:21 +0800 Received: from [180.200.167.117] (helo=[192.168.2.2]) by mail03.grapevine.net.au with esmtp (Exim 4.77) (envelope-from ) id 1UzGLt-00072x-7e for pthreads-win32@sourceware.org; Wed, 17 Jul 2013 11:16:21 +1000 Message-ID: <51E5F064.2030804@homemail.com.au> Date: Wed, 17 Jul 2013 01:16:00 -0000 From: Ross Johnson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: pthreads-win32@sourceware.org Subject: Re: entry point strncpy_s could not be located References: <51E5D13B.2020208@zeranoe.com> In-Reply-To: <51E5D13B.2020208@zeranoe.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013/txt/msg00014.txt.bz2 I've taken the other route and substituted strncpy() in place of strncpy_s() and ignored any compiler warnings. A null byte is explicitly added to ensure we comply with the [Linux] man page description that the returned string shall be null terminated (for the case where strncpy doesn't add one). This change has been committed to both the SourceForge Pthreads4w Git and sourceware.org Pthreads-win32 CVS repositories. Apologies for not researching the original additions thoroughly. On 17/07/2013 9:03 AM, Kyle Schwarz wrote: > I'm getting the following error while trying to run FFmpeg with > Windows XP using the latest version of pthreads-win32: "The procedure > entry point strncpy_s could not be located in the dynamic link library > msvcrt.dll" > > Here is a little more information about the bug: >> This is because of a change in the pthreads-w32 CVS. I encountered it >> after I updated to GCC 4.8.1 but didn't realize anything was wrong >> until I'd gotten x264 and FFmpeg built. Thankfully, none of the >> aggregate libraries seem to be affected by pthreads doing this, so it >> seems relatively benign. The binaries as distributed will work fine >> on Vista and higher since the version of msvcrt.dll has the secure >> API functions necessary. If WinXP is a target, pthreads needs a >> little patching. > > That was posted by the user qyot27 at: > > > There is also a patch that he submitted that seems to fix the issue: >> # For Windows XP users only: >> sed -i 's/ -DMINGW_HAS_SECURE_API//' GNUmakefile >> >> sed -i -e '60i#ifdef MINGW_HAS_SECURE_API' \ >> -e '61i#else\n strncpy(name, tp->name, len - 1);\n#endif' >> pthread_getname_np.c >> >> sed -i -e '46i#ifdef MINGW_HAS_SECURE_API' \ >> -e '47i#else\n strncpy(name, tp->name, len - 1);\n#endif' >> pthread_attr_getname_np.c > > I would really apprciate any help on this, currently my FFmpeg builds > are useless to Windows XP users because I utilize pthread-w32. > > Best regards, > Kyle