Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

FIX: "Macro Redefinition" message occurs if you include the "errno.h" and "winsock.h" header files in your C++ code in Windows Embedded Compact 2013


View products that this article applies to.

Introduction

This article describes a problem that occurs if you include the "errno.h" and "winsock.h" header files in your C++ code in Windows Embedded Compact 2013. An update is available to resolve this problem. Before you install this update, all previously issued updates for this product must be installed.

↑ Back to the top


Symptoms

Assume that you use the Windows Embedded Compact 2013 SDK to create a Console project in Visual Studio 2012. When you include both the "errno.h" and "winsock.h" header files in your C++ code, and then build the project, you receive the following warning message:

Macro Redefinition

↑ Back to the top


Cause

This problem occurs because the values for the error codes that are defined in the errno.h and winsock.h headers files do not match between the files.

Examples of error codes

From the errno.h header file:

#define EWOULDBLOCK 140

From the winsock.h header file:

#define WSAEWOULDBLOCK 10035L
#define EWOULDBLOCK WSAEWOULDBLOCK

The following is a code example to retrieve the error codes:

#include <errno.h>
#include <winsock.h>
int wmain(int argc, wchar_t *argv[])
{
printf("Welcome to Windows Embedded Project System \n");
return 0;
}

↑ Back to the top


Software update information

Download information

Windows Embedded Compact 2013 Monthly Update (April 2015) is now available from Microsoft. To download this Windows Embedded Compact 2013 monthly update, go to Microsoft OEM Online or MyOEM.

Prerequisites

This update is supported only if all previously issued updates for this product have also been installed.

Restart requirement

After you apply this update, you must perform a clean build of the whole platform. To do this, use one of the following methods:
  • On the Build menu, click Clean Solution, and then click Build Solution.
  • On the Build menu, click Rebuild Solution.
You do not have to restart the computer after you apply this software update.

Update replacement information

This update does not replace any other updates.

File information
The English version of this software update package has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Files that are included in this update package
File nameFile sizeDateTimePath
Errno.h3,45302-Apr-201509:23Public\Common\Sdk\Crt\Include
Winsock.h33,60502-Apr-201509:23Public\Common\Sdk\Inc

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


References

Learn about the terminology that Microsoft uses to describe software updates.

↑ Back to the top


Keywords: kbqfe, kbfix, kbsurveynew, kbexpertiseadvanced, atdownload, kb

↑ Back to the top

Article Info
Article ID : 3054392
Revision : 1
Created on : 1/7/2017
Published on : 5/21/2015
Exists online : False
Views : 180