diff options
Diffstat (limited to 'nt')
| -rw-r--r-- | nt/ChangeLog | 41 | ||||
| -rw-r--r-- | nt/INSTALL | 42 | ||||
| -rw-r--r-- | nt/addsection.c | 31 | ||||
| -rwxr-xr-x | nt/configure.bat | 101 | ||||
| -rw-r--r-- | nt/gmake.defs | 2 | ||||
| -rw-r--r-- | nt/inc/pwd.h | 4 | ||||
| -rw-r--r-- | nt/inc/sys/socket.h | 2 |
7 files changed, 183 insertions, 40 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 33507ef581d..66e1ea15438 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,44 @@ | |||
| 1 | 2005-06-11 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * configure.bat: If their fc.exe returns a meaningful exit status, | ||
| 4 | don't overwrite src/config.h and src/epaths.h with identical | ||
| 5 | copies. | ||
| 6 | |||
| 7 | * INSTALL: Warn about using "cvs up -kb" if one intends to commit | ||
| 8 | changes. Add a pointer to another site with detailed configure | ||
| 9 | and build instructions. Suggest to look at config.log when | ||
| 10 | configure fails. Add MinGW Make 3.80 to the list of successful | ||
| 11 | combinations. | ||
| 12 | |||
| 13 | * gmake.defs (ARCH_CFLAGS): Use $(MCPU_FLAG) instead of a literal | ||
| 14 | "-mcpu=i686". | ||
| 15 | |||
| 16 | * configure.bat: Update copyright years. | ||
| 17 | Delete config.log before doing anything else. | ||
| 18 | Write additional diagnostics to config.log in case of failures to | ||
| 19 | compile test programs, including the failed test program itself. | ||
| 20 | Add a test for support of -mtune=pentium4 switch to GCC; if it is | ||
| 21 | supported, set up MCPU_FLAG variable on the various Makefiles to | ||
| 22 | use that switch during compilations. (This avoids GCC warning | ||
| 23 | about -mcpu being deprecated.) | ||
| 24 | |||
| 25 | 2005-06-10 Eli Zaretskii <eliz@gnu.org> | ||
| 26 | |||
| 27 | * addsection.c (copy_executable_and_add_section): Pass non-zero | ||
| 28 | `verbose' arg to COPY_CHUNK only if DEBUG_DUMP is defined in the | ||
| 29 | environment. Print section names with %.8s. | ||
| 30 | (COPY_CHUNK): New 4th arg `verbose'; print diagnostic messages | ||
| 31 | only if non-zero. All callers changed. | ||
| 32 | |||
| 33 | 2005-06-05 Eli Zaretskii <eliz@gnu.org> | ||
| 34 | |||
| 35 | * inc/sys/socket.h: Change arg 4 of sys_setsockopt to | ||
| 36 | `const void *', for consistency with Posix. | ||
| 37 | |||
| 38 | 2005-06-04 Eli Zaretskii <eliz@gnu.org> | ||
| 39 | |||
| 40 | * inc/pwd.h (getpwnam, getpwuid): Add prototypes. | ||
| 41 | |||
| 1 | 2005-05-24 Juanma Barranquero <lekktu@gmail.com> | 42 | 2005-05-24 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 43 | ||
| 3 | * INSTALL: Add more pointers to ports of Unix tools to Windows, | 44 | * INSTALL: Add more pointers to ports of Unix tools to Windows, |
diff --git a/nt/INSTALL b/nt/INSTALL index e133d65e0d3..214caf7dd80 100644 --- a/nt/INSTALL +++ b/nt/INSTALL | |||
| @@ -15,10 +15,20 @@ | |||
| 15 | (.bat files, nmake.defs and makefile.w32-in) may need the line-ends | 15 | (.bat files, nmake.defs and makefile.w32-in) may need the line-ends |
| 16 | fixing first. The easiest way to do this and avoid future conflicts | 16 | fixing first. The easiest way to do this and avoid future conflicts |
| 17 | is to run the following command in this (emacs/nt) directory: | 17 | is to run the following command in this (emacs/nt) directory: |
| 18 | |||
| 18 | cvs update -kb | 19 | cvs update -kb |
| 20 | |||
| 21 | (WARNING: Do NOT use this suggestion if you have write access to the | ||
| 22 | Emacs CVS tree and intend to commit changes to CVS. This is because -kb | ||
| 23 | is sticky: it will be used in all future CVS operations on the files you | ||
| 24 | check out like this.) Alternatively, use programs that convert | ||
| 25 | end-of-line format, such as dos2unix and unix2dos available from | ||
| 26 | GnuWin32 or dtou and utod from the DJGPP project. | ||
| 27 | |||
| 19 | In addition to this file, you should also read INSTALL.CVS in the | 28 | In addition to this file, you should also read INSTALL.CVS in the |
| 20 | parent directory, and make sure that you have a version of "touch.exe" | 29 | parent directory, and make sure that you have a version of |
| 21 | in your path, and that it will create files that do not yet exist. | 30 | "touch.exe" in your path, and that it will create files that do not |
| 31 | yet exist. | ||
| 22 | 32 | ||
| 23 | To compile Emacs, you will need either Microsoft Visual C++ 2.0 or | 33 | To compile Emacs, you will need either Microsoft Visual C++ 2.0 or |
| 24 | later and nmake, or a Windows port of GCC 2.95 or later with MinGW | 34 | later and nmake, or a Windows port of GCC 2.95 or later with MinGW |
| @@ -51,6 +61,10 @@ | |||
| 51 | 61 | ||
| 52 | http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit | 62 | http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit |
| 53 | 63 | ||
| 64 | and at this URL: | ||
| 65 | |||
| 66 | http://ourcomments.org/Emacs/EmacsW32.html | ||
| 67 | |||
| 54 | For reference, here is a list of which builds of GNU make are known | 68 | For reference, here is a list of which builds of GNU make are known |
| 55 | to work or not, and whether they work in the presence and/or absence | 69 | to work or not, and whether they work in the presence and/or absence |
| 56 | of sh.exe, the Cygwin port of Bash. Note that any version of make | 70 | of sh.exe, the Cygwin port of Bash. Note that any version of make |
| @@ -77,6 +91,7 @@ | |||
| 77 | cygwin compiled make 3.78.1: fails[5] fails[2, 5] | 91 | cygwin compiled make 3.78.1: fails[5] fails[2, 5] |
| 78 | cygwin compiled make 3.79.1: fails[3, 5] fails[2?, 5] | 92 | cygwin compiled make 3.79.1: fails[3, 5] fails[2?, 5] |
| 79 | mingw32 compiled make 3.79.1: okay okay | 93 | mingw32 compiled make 3.79.1: okay okay |
| 94 | mingw32 compiled make 3.80: okay unknown[6] | ||
| 80 | 95 | ||
| 81 | Notes: | 96 | Notes: |
| 82 | 97 | ||
| @@ -88,6 +103,7 @@ | |||
| 88 | [4] may fail on Windows 9X and Windows ME; if so, install Bash. | 103 | [4] may fail on Windows 9X and Windows ME; if so, install Bash. |
| 89 | [5] fails when building leim due to the use of cygwin style paths. | 104 | [5] fails when building leim due to the use of cygwin style paths. |
| 90 | May work if building emacs without leim. | 105 | May work if building emacs without leim. |
| 106 | [6] please report if you try this combination. | ||
| 91 | 107 | ||
| 92 | * Configuring | 108 | * Configuring |
| 93 | 109 | ||
| @@ -105,6 +121,12 @@ | |||
| 105 | is running, when gcc support is being tested. These cannot be | 121 | is running, when gcc support is being tested. These cannot be |
| 106 | surpressed because of limitations in the Windows 9x command.com shell. | 122 | surpressed because of limitations in the Windows 9x command.com shell. |
| 107 | 123 | ||
| 124 | You are encouraged to look at the file config.log which shows details | ||
| 125 | for failed tests, after configure.bat finishes. Any unexplained failure | ||
| 126 | should be investigated and perhaps reported as a bug (see the section | ||
| 127 | about reporting bugs in the file README in this directory and in the | ||
| 128 | Emacs manual). | ||
| 129 | |||
| 108 | * Optional image library support | 130 | * Optional image library support |
| 109 | 131 | ||
| 110 | In addition to its "native" image formats (pbm and xbm), Emacs can | 132 | In addition to its "native" image formats (pbm and xbm), Emacs can |
| @@ -114,7 +136,11 @@ | |||
| 114 | configure script is run. This can be setup using environment | 136 | configure script is run. This can be setup using environment |
| 115 | variables, or by specifying --cflags -I... options on the command-line | 137 | variables, or by specifying --cflags -I... options on the command-line |
| 116 | to configure.bat. The configure script will report whether it was | 138 | to configure.bat. The configure script will report whether it was |
| 117 | able to detect the headers. | 139 | able to detect the headers. If the results of this testing appear to be |
| 140 | incorrect, please look for details in the file config.log: it will show | ||
| 141 | the failed test programs and compiler error messages that should explain | ||
| 142 | what is wrong. (Usually, any such failures happen because some headers | ||
| 143 | are missing due to bad packaging of the image support libraries.) | ||
| 118 | 144 | ||
| 119 | To use the external image support, the DLLs implementing the | 145 | To use the external image support, the DLLs implementing the |
| 120 | functionality must be found when Emacs first needs them, either on the | 146 | functionality must be found when Emacs first needs them, either on the |
| @@ -133,7 +159,9 @@ | |||
| 133 | 159 | ||
| 134 | Binaries for the image libraries (among many others) can be found at | 160 | Binaries for the image libraries (among many others) can be found at |
| 135 | the GnuWin32 project. These are built with MinGW, but they can be | 161 | the GnuWin32 project. These are built with MinGW, but they can be |
| 136 | used with both GCC/MinGW and MSVC builds of Emacs. | 162 | used with both GCC/MinGW and MSVC builds of Emacs. See the info on |
| 163 | http://ourcomments.org/Emacs/EmacsW32.html for more details about | ||
| 164 | installing image support libraries. | ||
| 137 | 165 | ||
| 138 | * Building | 166 | * Building |
| 139 | 167 | ||
| @@ -187,6 +215,12 @@ | |||
| 187 | addsection.c relies on. Versions of w32api-xxx.zip from at least | 215 | addsection.c relies on. Versions of w32api-xxx.zip from at least |
| 188 | 1999-11-18 onwards are okay. | 216 | 1999-11-18 onwards are okay. |
| 189 | 217 | ||
| 218 | When in doubt about correctness of what configure did, look at the file | ||
| 219 | config.log, which shows all the failed test programs and compiler | ||
| 220 | messages associated with the failures. If that doesn't give a clue, | ||
| 221 | please report the problems, together with the relevant fragments from | ||
| 222 | config.log, as bugs. | ||
| 223 | |||
| 190 | If configure succeeds, but make fails, install the Cygwin port of | 224 | If configure succeeds, but make fails, install the Cygwin port of |
| 191 | Bash, even if the table above indicates that Emacs should be able to | 225 | Bash, even if the table above indicates that Emacs should be able to |
| 192 | build without sh.exe. (Some versions of Windows shells are too dumb | 226 | build without sh.exe. (Some versions of Windows shells are too dumb |
diff --git a/nt/addsection.c b/nt/addsection.c index ae44c7f943c..8fbe8c38050 100644 --- a/nt/addsection.c +++ b/nt/addsection.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Add an uninitialized data section to an executable. | 1 | /* Add an uninitialized data section to an executable. |
| 2 | Copyright (C) 1999 Free Software Foundation, Inc. | 2 | Copyright (C) 1999, 2005 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -283,15 +283,19 @@ copy_executable_and_add_section (file_data *p_infile, | |||
| 283 | PIMAGE_SECTION_HEADER dst_section; | 283 | PIMAGE_SECTION_HEADER dst_section; |
| 284 | DWORD offset; | 284 | DWORD offset; |
| 285 | int i; | 285 | int i; |
| 286 | int be_verbose = GetEnvironmentVariable ("DEBUG_DUMP", NULL, 0) > 0; | ||
| 286 | 287 | ||
| 287 | #define COPY_CHUNK(message, src, size) \ | 288 | #define COPY_CHUNK(message, src, size, verbose) \ |
| 288 | do { \ | 289 | do { \ |
| 289 | unsigned char *s = (void *)(src); \ | 290 | unsigned char *s = (void *)(src); \ |
| 290 | unsigned long count = (size); \ | 291 | unsigned long count = (size); \ |
| 291 | printf ("%s\n", (message)); \ | 292 | if (verbose) \ |
| 292 | printf ("\t0x%08x Offset in input file.\n", s - p_infile->file_base); \ | 293 | { \ |
| 293 | printf ("\t0x%08x Offset in output file.\n", dst - p_outfile->file_base); \ | 294 | printf ("%s\n", (message)); \ |
| 294 | printf ("\t0x%08x Size in bytes.\n", count); \ | 295 | printf ("\t0x%08x Offset in input file.\n", s - p_infile->file_base); \ |
| 296 | printf ("\t0x%08x Offset in output file.\n", dst - p_outfile->file_base); \ | ||
| 297 | printf ("\t0x%08x Size in bytes.\n", count); \ | ||
| 298 | } \ | ||
| 295 | memcpy (dst, s, count); \ | 299 | memcpy (dst, s, count); \ |
| 296 | dst += count; \ | 300 | dst += count; \ |
| 297 | } while (0) | 301 | } while (0) |
| @@ -321,13 +325,14 @@ copy_executable_and_add_section (file_data *p_infile, | |||
| 321 | dst = (unsigned char *) p_outfile->file_base; | 325 | dst = (unsigned char *) p_outfile->file_base; |
| 322 | 326 | ||
| 323 | COPY_CHUNK ("Copying DOS header...", dos_header, | 327 | COPY_CHUNK ("Copying DOS header...", dos_header, |
| 324 | (DWORD) nt_header - (DWORD) dos_header); | 328 | (DWORD) nt_header - (DWORD) dos_header, be_verbose); |
| 325 | dst_nt_header = (PIMAGE_NT_HEADERS) dst; | 329 | dst_nt_header = (PIMAGE_NT_HEADERS) dst; |
| 326 | COPY_CHUNK ("Copying NT header...", nt_header, | 330 | COPY_CHUNK ("Copying NT header...", nt_header, |
| 327 | (DWORD) section - (DWORD) nt_header); | 331 | (DWORD) section - (DWORD) nt_header, be_verbose); |
| 328 | dst_section = (PIMAGE_SECTION_HEADER) dst; | 332 | dst_section = (PIMAGE_SECTION_HEADER) dst; |
| 329 | COPY_CHUNK ("Copying section table...", section, | 333 | COPY_CHUNK ("Copying section table...", section, |
| 330 | nt_header->FileHeader.NumberOfSections * sizeof (*section)); | 334 | nt_header->FileHeader.NumberOfSections * sizeof (*section), |
| 335 | be_verbose); | ||
| 331 | 336 | ||
| 332 | /* To improve the efficiency of demand loading, make the file | 337 | /* To improve the efficiency of demand loading, make the file |
| 333 | alignment match the section alignment (VC++ 6.0 does this by | 338 | alignment match the section alignment (VC++ 6.0 does this by |
| @@ -351,7 +356,9 @@ copy_executable_and_add_section (file_data *p_infile, | |||
| 351 | for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++) | 356 | for (i = 0; i < nt_header->FileHeader.NumberOfSections; i++) |
| 352 | { | 357 | { |
| 353 | char msg[100]; | 358 | char msg[100]; |
| 354 | sprintf (msg, "Copying raw data for %s...", section->Name); | 359 | /* Windows section names are fixed 8-char strings, only |
| 360 | zero-terminated if the name is shorter than 8 characters. */ | ||
| 361 | sprintf (msg, "Copying raw data for %.8s...", section->Name); | ||
| 355 | 362 | ||
| 356 | /* Update the file-relative offset for this section's raw data (if | 363 | /* Update the file-relative offset for this section's raw data (if |
| 357 | it has any) in case things have been relocated; we will update | 364 | it has any) in case things have been relocated; we will update |
| @@ -362,7 +369,7 @@ copy_executable_and_add_section (file_data *p_infile, | |||
| 362 | /* Can always copy the original raw data. */ | 369 | /* Can always copy the original raw data. */ |
| 363 | COPY_CHUNK | 370 | COPY_CHUNK |
| 364 | (msg, OFFSET_TO_PTR (section->PointerToRawData, p_infile), | 371 | (msg, OFFSET_TO_PTR (section->PointerToRawData, p_infile), |
| 365 | section->SizeOfRawData); | 372 | section->SizeOfRawData, be_verbose); |
| 366 | 373 | ||
| 367 | /* Round up the raw data size to the new alignment. */ | 374 | /* Round up the raw data size to the new alignment. */ |
| 368 | dst_section->SizeOfRawData = | 375 | dst_section->SizeOfRawData = |
| @@ -402,7 +409,7 @@ copy_executable_and_add_section (file_data *p_infile, | |||
| 402 | COPY_CHUNK | 409 | COPY_CHUNK |
| 403 | ("Copying remainder of executable...", | 410 | ("Copying remainder of executable...", |
| 404 | OFFSET_TO_PTR (offset, p_infile), | 411 | OFFSET_TO_PTR (offset, p_infile), |
| 405 | p_infile->size - offset); | 412 | p_infile->size - offset, be_verbose); |
| 406 | 413 | ||
| 407 | /* Final size for new image. */ | 414 | /* Final size for new image. */ |
| 408 | p_outfile->size = DST_TO_OFFSET (); | 415 | p_outfile->size = DST_TO_OFFSET (); |
diff --git a/nt/configure.bat b/nt/configure.bat index 216420873c7..8433cacc317 100755 --- a/nt/configure.bat +++ b/nt/configure.bat | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | @echo off | 1 | @echo off |
| 2 | rem ---------------------------------------------------------------------- | 2 | rem ---------------------------------------------------------------------- |
| 3 | rem Configuration script for MS Windows 95/98/Me and NT/2000/XP | 3 | rem Configuration script for MS Windows 95/98/Me and NT/2000/XP |
| 4 | rem Copyright (C) 1999-2003 Free Software Foundation, Inc. | 4 | rem Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 |
| 5 | rem Free Software Foundation, Inc. | ||
| 5 | 6 | ||
| 6 | rem This file is part of GNU Emacs. | 7 | rem This file is part of GNU Emacs. |
| 7 | 8 | ||
| @@ -47,6 +48,8 @@ rem [3] requires LC_MESSAGES support to build; maybe 2.95.x update to | |||
| 47 | rem cygwin provides this? | 48 | rem cygwin provides this? |
| 48 | rem | 49 | rem |
| 49 | 50 | ||
| 51 | if exist config.log del config.log | ||
| 52 | |||
| 50 | rem ---------------------------------------------------------------------- | 53 | rem ---------------------------------------------------------------------- |
| 51 | rem See if the environment is large enough. We need 43 (?) bytes. | 54 | rem See if the environment is large enough. We need 43 (?) bytes. |
| 52 | set $foo$=123456789_123456789_123456789_123456789_123 | 55 | set $foo$=123456789_123456789_123456789_123456789_123 |
| @@ -236,13 +239,17 @@ if (%nocygwin%) == (Y) goto chkapi | |||
| 236 | echo Checking whether gcc requires '-mno-cygwin'... | 239 | echo Checking whether gcc requires '-mno-cygwin'... |
| 237 | echo #include "cygwin/version.h" >junk.c | 240 | echo #include "cygwin/version.h" >junk.c |
| 238 | echo main(){} >>junk.c | 241 | echo main(){} >>junk.c |
| 239 | gcc -c junk.c | 242 | echo gcc -c junk.c >>config.log |
| 243 | gcc -c junk.c >>config.log 2>&1 | ||
| 240 | if not exist junk.o goto chkapi | 244 | if not exist junk.o goto chkapi |
| 241 | gcc -mno-cygwin -c junk.c | 245 | echo gcc -mno-cygwin -c junk.c >>config.log |
| 246 | gcc -mno-cygwin -c junk.c >>config.log 2>&1 | ||
| 242 | if exist junk.o set nocygwin=Y | 247 | if exist junk.o set nocygwin=Y |
| 243 | rm -f junk.c junk.o | 248 | rm -f junk.c junk.o |
| 244 | 249 | ||
| 245 | :chkapi | 250 | :chkapi |
| 251 | echo The failed program was: >>config.log | ||
| 252 | type junk.c >>config.log | ||
| 246 | rem ---------------------------------------------------------------------- | 253 | rem ---------------------------------------------------------------------- |
| 247 | rem Older versions of the Windows API headers either don't have any of | 254 | rem Older versions of the Windows API headers either don't have any of |
| 248 | rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1 | 255 | rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1 |
| @@ -263,9 +270,13 @@ set cf=%usercflags% -mno-cygwin | |||
| 263 | :chkapi2 | 270 | :chkapi2 |
| 264 | echo on | 271 | echo on |
| 265 | gcc %cf% -c junk.c | 272 | gcc %cf% -c junk.c |
| 266 | echo off | 273 | @echo off |
| 274 | @echo gcc %cf% -c junk.c >>config.log | ||
| 275 | gcc %cf% -c junk.c >>config.log 2>&1 | ||
| 267 | set cf= | 276 | set cf= |
| 268 | if exist junk.o goto gccOk | 277 | if exist junk.o goto gccOk |
| 278 | echo The failed program was: >>config.log | ||
| 279 | type junk.c >>config.log | ||
| 269 | 280 | ||
| 270 | :nocompiler | 281 | :nocompiler |
| 271 | echo. | 282 | echo. |
| @@ -278,8 +289,23 @@ goto end | |||
| 278 | 289 | ||
| 279 | :gccOk | 290 | :gccOk |
| 280 | set COMPILER=gcc | 291 | set COMPILER=gcc |
| 281 | rm -f junk.c junk.o | ||
| 282 | echo Using 'gcc' | 292 | echo Using 'gcc' |
| 293 | rm -f junk.c junk.o | ||
| 294 | Rem It is not clear what GCC version began supporting -mtune | ||
| 295 | Rem and pentium4 on x86, so check this explicitly. | ||
| 296 | echo main(){} >junk.c | ||
| 297 | echo gcc -c -O2 -mtune=pentium4 junk.c >>config.log | ||
| 298 | gcc -c -O2 -mtune=pentium4 junk.c >>config.log 2>&1 | ||
| 299 | if not errorlevel 1 goto gccMtuneOk | ||
| 300 | echo The failed program was: >>config.log | ||
| 301 | type junk.c >>config.log | ||
| 302 | set mf=-mcpu=i686 | ||
| 303 | rm -f junk.c junk.o | ||
| 304 | goto compilercheckdone | ||
| 305 | :gccMtuneOk | ||
| 306 | echo GCC supports -mtune=pentium4 >>config.log | ||
| 307 | set mf=-mtune=pentium4 | ||
| 308 | rm -f junk.c junk.o | ||
| 283 | goto compilercheckdone | 309 | goto compilercheckdone |
| 284 | 310 | ||
| 285 | :clOk | 311 | :clOk |
| @@ -307,10 +333,13 @@ echo Checking for libpng... | |||
| 307 | echo #include "png.h" >junk.c | 333 | echo #include "png.h" >junk.c |
| 308 | echo main (){} >>junk.c | 334 | echo main (){} >>junk.c |
| 309 | rem -o option is ignored with cl, but allows result to be consistent. | 335 | rem -o option is ignored with cl, but allows result to be consistent. |
| 310 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err | 336 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log |
| 337 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log | ||
| 311 | if exist junk.obj goto havePng | 338 | if exist junk.obj goto havePng |
| 312 | 339 | ||
| 313 | echo ...png.h not found, building without PNG support. | 340 | echo ...png.h not found, building without PNG support. |
| 341 | echo The failed program was: >>config.log | ||
| 342 | type junk.c >>config.log | ||
| 314 | set HAVE_PNG= | 343 | set HAVE_PNG= |
| 315 | goto :pngDone | 344 | goto :pngDone |
| 316 | 345 | ||
| @@ -327,10 +356,13 @@ echo Checking for jpeg-6b... | |||
| 327 | echo #include "jconfig.h" >junk.c | 356 | echo #include "jconfig.h" >junk.c |
| 328 | echo main (){} >>junk.c | 357 | echo main (){} >>junk.c |
| 329 | rem -o option is ignored with cl, but allows result to be consistent. | 358 | rem -o option is ignored with cl, but allows result to be consistent. |
| 330 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err | 359 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log |
| 360 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log | ||
| 331 | if exist junk.obj goto haveJpeg | 361 | if exist junk.obj goto haveJpeg |
| 332 | 362 | ||
| 333 | echo ...jconfig.h not found, building without JPEG support. | 363 | echo ...jconfig.h not found, building without JPEG support. |
| 364 | echo The failed program was: >>config.log | ||
| 365 | type junk.c >>config.log | ||
| 334 | set HAVE_JPEG= | 366 | set HAVE_JPEG= |
| 335 | goto :jpegDone | 367 | goto :jpegDone |
| 336 | 368 | ||
| @@ -347,10 +379,13 @@ echo Checking for libgif... | |||
| 347 | echo #include "gif_lib.h" >junk.c | 379 | echo #include "gif_lib.h" >junk.c |
| 348 | echo main (){} >>junk.c | 380 | echo main (){} >>junk.c |
| 349 | rem -o option is ignored with cl, but allows result to be consistent. | 381 | rem -o option is ignored with cl, but allows result to be consistent. |
| 350 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err | 382 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log |
| 383 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log | ||
| 351 | if exist junk.obj goto haveGif | 384 | if exist junk.obj goto haveGif |
| 352 | 385 | ||
| 353 | echo ...gif_lib.h not found, building without GIF support. | 386 | echo ...gif_lib.h not found, building without GIF support. |
| 387 | echo The failed program was: >>config.log | ||
| 388 | type junk.c >>config.log | ||
| 354 | set HAVE_GIF= | 389 | set HAVE_GIF= |
| 355 | goto :gifDone | 390 | goto :gifDone |
| 356 | 391 | ||
| @@ -367,10 +402,13 @@ echo Checking for tiff... | |||
| 367 | echo #include "tiffio.h" >junk.c | 402 | echo #include "tiffio.h" >junk.c |
| 368 | echo main (){} >>junk.c | 403 | echo main (){} >>junk.c |
| 369 | rem -o option is ignored with cl, but allows result to be consistent. | 404 | rem -o option is ignored with cl, but allows result to be consistent. |
| 370 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err | 405 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log |
| 406 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log | ||
| 371 | if exist junk.obj goto haveTiff | 407 | if exist junk.obj goto haveTiff |
| 372 | 408 | ||
| 373 | echo ...tiffio.h not found, building without TIFF support. | 409 | echo ...tiffio.h not found, building without TIFF support. |
| 410 | echo The failed program was: >>config.log | ||
| 411 | type junk.c >>config.log | ||
| 374 | set HAVE_TIFF= | 412 | set HAVE_TIFF= |
| 375 | goto :tiffDone | 413 | goto :tiffDone |
| 376 | 414 | ||
| @@ -388,10 +426,13 @@ echo #define FOR_MSW 1 >junk.c | |||
| 388 | echo #include "X11/xpm.h" >>junk.c | 426 | echo #include "X11/xpm.h" >>junk.c |
| 389 | echo main (){} >>junk.c | 427 | echo main (){} >>junk.c |
| 390 | rem -o option is ignored with cl, but allows result to be consistent. | 428 | rem -o option is ignored with cl, but allows result to be consistent. |
| 391 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>junk.err | 429 | echo %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >>config.log |
| 430 | %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj >junk.out 2>>config.log | ||
| 392 | if exist junk.obj goto haveXpm | 431 | if exist junk.obj goto haveXpm |
| 393 | 432 | ||
| 394 | echo ...X11/xpm.h not found, building without XPM support. | 433 | echo ...X11/xpm.h not found, building without XPM support. |
| 434 | echo The failed program was: >>config.log | ||
| 435 | type junk.c >>config.log | ||
| 395 | set HAVE_XPM= | 436 | set HAVE_XPM= |
| 396 | goto :xpmDone | 437 | goto :xpmDone |
| 397 | 438 | ||
| @@ -414,6 +455,7 @@ rem except when there is a preceding digit, when a space is required. | |||
| 414 | rem | 455 | rem |
| 415 | echo # Start of settings from configure.bat >config.settings | 456 | echo # Start of settings from configure.bat >config.settings |
| 416 | echo COMPILER=%COMPILER%>>config.settings | 457 | echo COMPILER=%COMPILER%>>config.settings |
| 458 | if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>config.settings | ||
| 417 | if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings | 459 | if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings |
| 418 | if (%noopt%) == (Y) echo NOOPT=1 >>config.settings | 460 | if (%noopt%) == (Y) echo NOOPT=1 >>config.settings |
| 419 | if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings | 461 | if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings |
| @@ -423,20 +465,34 @@ if not "(%userldflags%)" == "()" echo USER_LDFLAGS=%userldflags%>>config.setting | |||
| 423 | echo # End of settings from configure.bat>>config.settings | 465 | echo # End of settings from configure.bat>>config.settings |
| 424 | echo. >>config.settings | 466 | echo. >>config.settings |
| 425 | 467 | ||
| 426 | copy config.nt ..\src\config.h | 468 | copy config.nt config.tmp |
| 427 | echo. >>..\src\config.h | 469 | echo. >>config.tmp |
| 428 | echo /* Start of settings from configure.bat. */ >>..\src\config.h | 470 | echo /* Start of settings from configure.bat. */ >>config.tmp |
| 429 | if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>..\src\config.h | 471 | if not "(%usercflags%)" == "()" echo #define USER_CFLAGS " %usercflags%">>config.tmp |
| 430 | if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>..\src\config.h | 472 | if not "(%userldflags%)" == "()" echo #define USER_LDFLAGS " %userldflags%">>config.tmp |
| 431 | if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>..\src\config.h | 473 | if not "(%HAVE_PNG%)" == "()" echo #define HAVE_PNG 1 >>config.tmp |
| 432 | if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>..\src\config.h | 474 | if not "(%HAVE_JPEG%)" == "()" echo #define HAVE_JPEG 1 >>config.tmp |
| 433 | if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>..\src\config.h | 475 | if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp |
| 434 | if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>..\src\config.h | 476 | if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>config.tmp |
| 435 | if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>..\src\config.h | 477 | if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>config.tmp |
| 436 | echo /* End of settings from configure.bat. */ >>..\src\config.h | 478 | echo /* End of settings from configure.bat. */ >>config.tmp |
| 437 | 479 | ||
| 480 | Rem See if fc.exe returns a meaningful exit status. If it does, we | ||
| 481 | Rem might as well avoid unnecessary overwriting of config.h and epaths.h, | ||
| 482 | Rem since this forces recompilation of every source file. | ||
| 483 | if exist foo.bar del foo.bar | ||
| 484 | fc /b foo.bar foo.bar >nul 2>&1 | ||
| 485 | if not errorlevel 2 goto doCopy | ||
| 486 | fc /b config.tmp ..\src\config.h >nul 2>&1 | ||
| 487 | if errorlevel 1 goto doCopy | ||
| 488 | fc /b paths.h ..\src\epaths.h >nul 2>&1 | ||
| 489 | if errorlevel 0 goto dontCopy | ||
| 490 | :doCopy | ||
| 491 | copy config.tmp ..\src\config.h | ||
| 438 | copy paths.h ..\src\epaths.h | 492 | copy paths.h ..\src\epaths.h |
| 439 | 493 | ||
| 494 | :dontCopy | ||
| 495 | if exist config.tmp del config.tmp | ||
| 440 | copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile | 496 | copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile |
| 441 | copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile | 497 | copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile |
| 442 | copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile | 498 | copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile |
| @@ -474,6 +530,7 @@ set MAKECMD= | |||
| 474 | set usercflags= | 530 | set usercflags= |
| 475 | set userldflags= | 531 | set userldflags= |
| 476 | set mingwflag= | 532 | set mingwflag= |
| 533 | set mf= | ||
| 477 | 534 | ||
| 478 | goto skipArchTag | 535 | goto skipArchTag |
| 479 | arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c | 536 | arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c |
diff --git a/nt/gmake.defs b/nt/gmake.defs index bd201cd3314..23d3dac3719 100644 --- a/nt/gmake.defs +++ b/nt/gmake.defs | |||
| @@ -253,7 +253,7 @@ ifeq "$(ARCH)" "i386" | |||
| 253 | ifdef NOOPT | 253 | ifdef NOOPT |
| 254 | ARCH_CFLAGS = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) | 254 | ARCH_CFLAGS = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) |
| 255 | else | 255 | else |
| 256 | ARCH_CFLAGS = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) -mcpu=i686 -O2 \ | 256 | ARCH_CFLAGS = -D_X86_=1 -c $(DEBUG_FLAG) $(NOCYGWIN) $(MCPU_FLAG) -O2 \ |
| 257 | # -fbuiltin \ | 257 | # -fbuiltin \ |
| 258 | # -finline-functions \ | 258 | # -finline-functions \ |
| 259 | # -fomit-frame-pointer | 259 | # -fomit-frame-pointer |
diff --git a/nt/inc/pwd.h b/nt/inc/pwd.h index 11f5669b0f0..31c0df7ec30 100644 --- a/nt/inc/pwd.h +++ b/nt/inc/pwd.h | |||
| @@ -18,6 +18,10 @@ struct passwd { | |||
| 18 | typedef int uid_t; | 18 | typedef int uid_t; |
| 19 | typedef uid_t gid_t; | 19 | typedef uid_t gid_t; |
| 20 | 20 | ||
| 21 | struct passwd * getpwnam (char *); | ||
| 22 | struct passwd * getpwuid (int); | ||
| 23 | |||
| 24 | |||
| 21 | #endif /* _PWD_H_ */ | 25 | #endif /* _PWD_H_ */ |
| 22 | 26 | ||
| 23 | /* arch-tag: 68308424-cb2b-49ed-bb52-b347fee416bf | 27 | /* arch-tag: 68308424-cb2b-49ed-bb52-b347fee416bf |
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h index 422a27d1b52..d3936da2a4d 100644 --- a/nt/inc/sys/socket.h +++ b/nt/inc/sys/socket.h | |||
| @@ -102,7 +102,7 @@ struct hostent * sys_gethostbyname (const char * name); | |||
| 102 | struct servent * sys_getservbyname (const char * name, const char * proto); | 102 | struct servent * sys_getservbyname (const char * name, const char * proto); |
| 103 | int sys_getpeername (int s, struct sockaddr *addr, int * namelen); | 103 | int sys_getpeername (int s, struct sockaddr *addr, int * namelen); |
| 104 | int sys_shutdown (int socket, int how); | 104 | int sys_shutdown (int socket, int how); |
| 105 | int sys_setsockopt (int s, int level, int oname, const char * oval, int olen); | 105 | int sys_setsockopt (int s, int level, int oname, const void * oval, int olen); |
| 106 | int sys_listen (int s, int backlog); | 106 | int sys_listen (int s, int backlog); |
| 107 | int sys_getsockname (int s, struct sockaddr * name, int * namelen); | 107 | int sys_getsockname (int s, struct sockaddr * name, int * namelen); |
| 108 | int sys_accept (int s, struct sockaddr *addr, int *addrlen); | 108 | int sys_accept (int s, struct sockaddr *addr, int *addrlen); |