Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8877411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:27:44+00:00 2026-06-14T19:27:44+00:00

Take this simple program #include <stdio.h> #include <string.h> #include <errno.h> int main (void) {

  • 0

Take this simple program

#include <stdio.h>
#include <string.h>
#include <errno.h>

int
main (void)
{
  printf ("ERROR %d %s\n", ETIMEDOUT, strerror (ETIMEDOUT));
  return 0;
}

If you compile it with Cygwin gcc it runs fine

$ gcc a.c

$ ./a
ERROR 116 Connection timed out

If you compile it with MinGW-w64 gcc it does not give proper error message

$ i686-w64-mingw32-gcc a.c

$ ./a
ERROR 138 Unknown error

How can I get MinGW-w64 to put correct error message?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:27:46+00:00Added an answer on June 14, 2026 at 7:27 pm

    ETIMEDOUT seems to be a POSIX extension to the ISO C standard errno.h. Cygwin has better support for POSIX than MinGW. A bug report about ETIMEDOUT for mingw32 was opened and closed in 2007.

    One option is to use the GNU Portability Library (Gnulib). It provides a POSIX-like errno.h and strerror()/strerror_override() .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Take this simple example: class Program { static void Main(string[] args) { var windsorContainer
Suppose I have the following program: #include <stdio.h> int main() { printf(This is a
take this simple code: class A{ public: virtual void foo() = 0; void x(){
I have this very simple br2nl function that I use to take a string
Take a look at this super-simple small test-case OpenGL program written in Go: package
Why doesn't object.__init__ take *args, **kwargs as arguments? This breaks some simple code in
Take a simple XML file formatted like this: <Lists> <List> <Note/> ... <Note/> </List>
I am trying to make a simple alarm. in this code portion a take
I have written a simple code using getopt for understanding perspective. #include <stdio.h> #include
I can't figure out why this simple program I wrote gets an IndexOutOfBounds exception

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.