DevO2012 / gflags

Automatically exported from code.google.com/p/gflags
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

replace strdup with _strdup #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build solution for libgflags using Visual C++ 2012

What is the expected output? What do you see instead?
Getting warnings (5 occurrences):
gflags-2.0\src\gflags.cc(1947): warning C4996: 'strdup': The POSIX name for 
this item is deprecated. Instead, use the ISO C++ conformant name: _strdup.

What version of the product are you using? On what operating system?
Visual C++ 2012 on Windows 7.

Please provide any additional information below.
A simple search and replace s/strdup/_strdup is sufficient to remove these 
warnings.

Original issue reported on code.google.com by Alex.Lou...@gmail.com on 6 Sep 2012 at 11:47

GoogleCodeExporter commented 9 years ago
Fixed in r80 of the trunk. Instead of a search and replace (which would 
probably result in compiler errors with GCC on Unix), I added proper defines to 
the src/windows/port.h file.

http://code.google.com/p/gflags/source/diff?spec=svn80&r=80&format=side&path=/tr
unk/src/windows/port.h&old_path=/trunk/src/windows/port.h&old=54

Original comment by andreas....@gmail.com on 20 Nov 2012 at 2:52

GoogleCodeExporter commented 9 years ago

Original comment by andreas....@gmail.com on 20 Mar 2014 at 3:30