This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libgfortran,patch] MinGW wrapper for getlogin, gethostname andgetpid functions


What is wrong with the winsock2.h gethostname(), which more closely emulates BSD
socket semantics?

Because, if I understand correctly, it requires linking programs with libws2_32.a, and I'd rather not create special cases for MinGW in the build process. The non-standard HOSTNM routine is mainly used for code displaying a welcoming "Simulation started on host venus at $date", so I don't think we should care too much about details at that point.


Answer to your mail about getpid() in <process.h>: it works perfectly, I simply didn't know it was there. When I code on MinGW, I just try to do things just like I would on a Unix platform, and then if it fails I go to MSDN online doc and look up for the Windows way to do it. From now on, I will grep /mingw/include for interesting things.

FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]