From 9c510edc61bef580f66590d0932a64873307e1c5 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 5 Nov 2001 06:09:15 +0000 Subject: Eliminate excess whitespace. --- winsup/cygwin/cygheap.cc | 10 +++--- winsup/cygwin/debug.cc | 2 +- winsup/cygwin/dir.cc | 2 +- winsup/cygwin/dtable.cc | 4 +-- winsup/cygwin/external.cc | 2 +- winsup/cygwin/fhandler.cc | 8 ++--- winsup/cygwin/fhandler_dsp.cc | 3 +- winsup/cygwin/fhandler_socket.cc | 6 ++-- winsup/cygwin/fork.cc | 2 +- winsup/cygwin/heap.cc | 4 +-- winsup/cygwin/include/cygwin/if.h | 40 +++++++++++----------- winsup/cygwin/include/cygwin/types.h | 2 +- winsup/cygwin/include/cygwin/version.h | 22 ++++++------ winsup/cygwin/include/pthread.h | 4 +-- winsup/cygwin/include/sys/resource.h | 20 +++++------ winsup/cygwin/include/sys/soundcard.h | 62 +++++++++++++++++----------------- winsup/cygwin/include/sys/un.h | 2 +- winsup/cygwin/lib/dll_main.cc | 2 +- winsup/cygwin/lib/getopt.c | 12 +++---- winsup/cygwin/mmap.cc | 2 +- winsup/cygwin/net.cc | 32 +++++++++--------- winsup/cygwin/path.cc | 24 ++++++------- winsup/cygwin/path.h | 2 +- winsup/cygwin/pipe.cc | 2 +- winsup/cygwin/poll.cc | 2 +- winsup/cygwin/pwdgrp.h | 24 ++++++------- winsup/cygwin/security.cc | 2 +- winsup/cygwin/select.cc | 4 +-- winsup/cygwin/shared.cc | 2 +- winsup/cygwin/spawn.cc | 6 ++-- winsup/cygwin/syscalls.cc | 16 ++++----- winsup/cygwin/sysconf.cc | 2 +- winsup/cygwin/thread.cc | 10 +++--- winsup/cygwin/thread.h | 2 +- winsup/cygwin/uinfo.cc | 6 ++-- winsup/cygwin/uname.cc | 2 +- winsup/cygwin/wincap.cc | 14 ++++---- winsup/cygwin/wincap.h | 4 +-- 38 files changed, 183 insertions(+), 184 deletions(-) diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 739c4ca..79fb484 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -93,12 +93,12 @@ cygheap_setup_for_child (child_info *ci, bool dup_later) void __stdcall cygheap_setup_for_child_cleanup (void *newcygheap, child_info *ci, - bool dup_it_now) + bool dup_it_now) { if (dup_it_now) { /* NOTE: There is an assumption here that cygheap_max has not changed - between the time that cygheap_setup_for_child was called and now. + between the time that cygheap_setup_for_child was called and now. Make sure that this is a correct assumption. */ cygheap_protect->acquire (); dup_now (newcygheap, ci, (char *) cygheap_max - (char *) cygheap); @@ -377,13 +377,13 @@ init_cygheap::etc_changed () FILE_NOTIFY_CHANGE_LAST_WRITE); if (etc_changed_h == INVALID_HANDLE_VALUE) system_printf ("Can't open /etc for checking, %E", (char *) pwd, - etc_changed_h); + etc_changed_h); else if (!DuplicateHandle (hMainProc, etc_changed_h, hMainProc, - &etc_changed_h, 0, TRUE, + &etc_changed_h, 0, TRUE, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE)) { system_printf ("Can't inherit /etc handle, %E", (char *) pwd, - etc_changed_h); + etc_changed_h); etc_changed_h = INVALID_HANDLE_VALUE; } } diff --git a/winsup/cygwin/debug.cc b/winsup/cygwin/debug.cc index ef2ba1f..a25283e 100644 --- a/winsup/cygwin/debug.cc +++ b/winsup/cygwin/debug.cc @@ -124,7 +124,7 @@ out: info->arg = param; /* The single parameter to the thread */ if ((h = CreateThread (&sec_none_nih, 0, thread_stub, (VOID *) info, flags, - &tid))) + &tid))) regthread (name, tid); /* Register for debugging output. */ return h; diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index 6ca1695..b99bef3 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -378,7 +378,7 @@ rmdir (const char *dir) /* Even own directories can't be removed if R/O attribute is set. */ if (real_dir.has_attribute (FILE_ATTRIBUTE_READONLY)) SetFileAttributes (real_dir, - (DWORD) real_dir & ~FILE_ATTRIBUTE_READONLY); + (DWORD) real_dir & ~FILE_ATTRIBUTE_READONLY); if (RemoveDirectory (real_dir)) { diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 389afee..3cf52c0 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -178,7 +178,7 @@ cygwin_attach_handle_to_fd (char *name, int fd, HANDLE handle, mode_t bin, fd = cygheap->fdtab.find_unused_handle (); path_conv pc; fhandler_base *res = cygheap->fdtab.build_fhandler_from_name (fd, name, handle, - pc); + pc); res->init (handle, myaccess, bin); return fd; } @@ -242,7 +242,7 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle, DWORD myaccess) fhandler_base * dtable::build_fhandler_from_name (int fd, const char *name, HANDLE handle, - path_conv& pc, unsigned opt, suffix_info *si) + path_conv& pc, unsigned opt, suffix_info *si) { pc.check (name, opt | PC_NULLEMPTY | PC_FULL, si); if (pc.error) diff --git a/winsup/cygwin/external.cc b/winsup/cygwin/external.cc index 5780647..1589e92 100644 --- a/winsup/cygwin/external.cc +++ b/winsup/cygwin/external.cc @@ -187,7 +187,7 @@ cygwin_internal (cygwin_getinfo_types t, ...) if (check_null_empty_str_errno (cr)) return (DWORD) NULL; cygheap->cygwin_regname = (char *) crealloc (cygheap->cygwin_regname, - strlen (cr) + 1); + strlen (cr) + 1); strcpy (cygheap->cygwin_regname, cr); case CW_GET_CYGWIN_REGISTRY_NAME: return (DWORD) cygheap->cygwin_regname; diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index c2431d6..510c725 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -389,7 +389,7 @@ fhandler_base::open (path_conv *, int flags, mode_t mode) set_security_attribute (mode, &sa, alloca (4096), 4096); x = CreateFile (get_win32_name (), access, shared, &sa, creation_distribution, - file_attributes, 0); + file_attributes, 0); syscall_printf ("%p = CreateFileA (%s, %p, %p, %p, %p, %p, 0)", x, get_win32_name (), access, shared, &sa, @@ -927,11 +927,11 @@ fhandler_disk_file::fstat (struct stat *buf, path_conv *pc) This will allow us to determine *some* things about the file, at least. */ set_query_open (TRUE); if ((oret = open (pc, open_flags, 0))) - /* ok */; + /* ok */; else if (allow_ntsec && pc->has_acls () && get_errno () == EACCES && !get_file_attribute (TRUE, get_win32_name (), &ntsec_atts, &uid, &gid) && !ntsec_atts && uid == myself->uid && gid == myself->gid) - { + { /* Check a special case here. If ntsec is ON it happens that a process creates a file using mode 000 to disallow other processes access. In contrast to UNIX, this results @@ -940,7 +940,7 @@ fhandler_disk_file::fstat (struct stat *buf, path_conv *pc) set_file_attribute (TRUE, get_win32_name (), 0400); oret = open (pc, open_flags, 0); set_file_attribute (TRUE, get_win32_name (), ntsec_atts); - } + } } if (oret) { diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler_dsp.cc index c55b7e2..e380b3e 100644 --- a/winsup/cygwin/fhandler_dsp.cc +++ b/winsup/cygwin/fhandler_dsp.cc @@ -525,8 +525,7 @@ fhandler_dev_dsp::ioctl (unsigned int cmd, void *ptr) CASE (SNDCTL_DSP_GETBLKSIZE) *intptr = Audio::BLOCK_SIZE; - return 0; - break; + return 0; CASE (SNDCTL_DSP_SETFMT) { diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc index 95793b4..3d6a13d 100644 --- a/winsup/cygwin/fhandler_socket.cc +++ b/winsup/cygwin/fhandler_socket.cc @@ -45,7 +45,7 @@ fhandler_socket::fhandler_socket () : fhandler_base (FH_SOCKET) { set_need_fork_fixup (); - prot_info_ptr = (LPWSAPROTOCOL_INFOA) cmalloc (HEAP_BUF, + prot_info_ptr = (LPWSAPROTOCOL_INFOA) cmalloc (HEAP_BUF, sizeof (WSAPROTOCOL_INFOA)); } @@ -174,7 +174,7 @@ fhandler_socket::fixup_before_fork_exec (DWORD win_proc_id) else { debug_printf ("WSADuplicateSocket error, sock %p, win_proc_id %d, prot_info_ptr %p", - get_socket (), win_proc_id, prot_info_ptr); + get_socket (), win_proc_id, prot_info_ptr); set_winsock_errno (); } } @@ -290,7 +290,7 @@ fhandler_socket::close () (const char *)&linger, sizeof linger); while ((res = closesocket (get_socket ())) - && WSAGetLastError () == WSAEWOULDBLOCK) + && WSAGetLastError () == WSAEWOULDBLOCK) continue; if (res) { diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 9bc5bd8..a233ae4 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -218,7 +218,7 @@ sync_with_parent(const char *s, bool hang_self) WaitForSingleObject (child_proc_info->forker_finished, 1) != WAIT_FAILED) break; api_fatal ("WFSO failed for %s, fork_finished %p, %E", s, - child_proc_info->forker_finished); + child_proc_info->forker_finished); break; default: debug_printf ("no problems"); diff --git a/winsup/cygwin/heap.cc b/winsup/cygwin/heap.cc index eaa500c..9a3e2b8 100644 --- a/winsup/cygwin/heap.cc +++ b/winsup/cygwin/heap.cc @@ -70,14 +70,14 @@ heap_init () * to assure contiguous memory. */ cygheap->heapptr = cygheap->heaptop = cygheap->heapbase = VirtualAlloc(NULL, cygwin_shared->heap_chunk_size (), MEM_RESERVE, - PAGE_NOACCESS); + PAGE_NOACCESS); if (cygheap->heapbase == NULL) api_fatal ("2. unable to allocate heap, heap_chunk_size %d, %E", cygwin_shared->heap_chunk_size ()); } debug_printf ("heap base %p, heap top %p", cygheap->heapbase, - cygheap->heaptop); + cygheap->heaptop); page_const--; malloc_init (); } diff --git a/winsup/cygwin/include/cygwin/if.h b/winsup/cygwin/include/cygwin/if.h index a743ed5..b0953de 100644 --- a/winsup/cygwin/include/cygwin/if.h +++ b/winsup/cygwin/include/cygwin/if.h @@ -38,20 +38,20 @@ struct ifreq { #define IFNAMSIZ 16 #define IFHWADDRLEN 6 - union - { - char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ - } ifr_ifrn; - - union { - struct sockaddr ifru_addr; - struct sockaddr ifru_broadaddr; - struct sockaddr ifru_netmask; - struct sockaddr ifru_hwaddr; - short ifru_flags; - int ifru_metric; - int ifru_mtu; - } ifr_ifru; + union + { + char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ + } ifr_ifrn; + + union { + struct sockaddr ifru_addr; + struct sockaddr ifru_broadaddr; + struct sockaddr ifru_netmask; + struct sockaddr ifru_hwaddr; + short ifru_flags; + int ifru_metric; + int ifru_mtu; + } ifr_ifru; }; #define ifr_name ifr_ifrn.ifrn_name /* interface name */ @@ -73,12 +73,12 @@ struct ifreq struct ifconf { - int ifc_len; /* size of buffer */ - union - { - caddr_t ifcu_buf; - struct ifreq *ifcu_req; - } ifc_ifcu; + int ifc_len; /* size of buffer */ + union + { + caddr_t ifcu_buf; + struct ifreq *ifcu_req; + } ifc_ifcu; }; #define ifc_buf ifc_ifcu.ifcu_buf /* buffer address */ #define ifc_req ifc_ifcu.ifcu_req /* array of structures */ diff --git a/winsup/cygwin/include/cygwin/types.h b/winsup/cygwin/include/cygwin/types.h index 7114b7c..c17eca4 100644 --- a/winsup/cygwin/include/cygwin/types.h +++ b/winsup/cygwin/include/cygwin/types.h @@ -1,6 +1,6 @@ /* types.h - Copyright 2001 Red Hat Inc. + Copyright 2001 Red Hat Inc. Written by Robert Collins This file is part of Cygwin. diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 77cf667..98f5596 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -93,12 +93,12 @@ details. */ /* API_MAJOR 0.0: Initial version. API_MINOR changes: 1: Export cygwin32_ calls as cygwin_ as well. 2: Export j1, jn, y1, yn. - 3: Export dll_noncygwin_dllcrt0. - 4: New socket ioctls, revamped ifconf support. - 5: Thread support/exports. - 6: Change in termios handling. - 7: Export scandir and alphasort. - 8: Export _ctype_, _sys_errlist, _sys_nerr. + 3: Export dll_noncygwin_dllcrt0. + 4: New socket ioctls, revamped ifconf support. + 5: Thread support/exports. + 6: Change in termios handling. + 7: Export scandir and alphasort. + 8: Export _ctype_, _sys_errlist, _sys_nerr. 9: Mount-related changes, new cygwin_umount export. Raw device support (tape, floppies). 10: Fast math routine support added. @@ -114,10 +114,10 @@ details. */ 20: regsub, inet_network 21: incompatible change to stdio cr/lf and buffering 22: Export cygwin_logon_user, cygwin_set_impersonation_token. - geteuid, getegid return effective uid/gid. - getuid, getgid return real uid/gid. - seteuid, setegid set only effective uid/gid. - setuid, setgid set effective and real uid/gid. + geteuid, getegid return effective uid/gid. + getuid, getgid return real uid/gid. + seteuid, setegid set only effective uid/gid. + setuid, setgid set effective and real uid/gid. 23: Export new dll_crt0 interface and cygwin_user_data for use with crt0 startup code. 24: Export poll and _poll. @@ -132,7 +132,7 @@ details. */ 33: Export setlogmask 34: Separated out mount table 35: Export drand48, erand48, jrand48, lcong48, lrand48, - mrand48, nrand48, seed48, and srand48. + mrand48, nrand48, seed48, and srand48. 36: Added _cygwin_S_IEXEC, et al 37: [f]pathconv support _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY 38: vscanf, vscanf_r, and random pthread functions diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h index 486635d..3c51cf1 100644 --- a/winsup/cygwin/include/pthread.h +++ b/winsup/cygwin/include/pthread.h @@ -83,7 +83,7 @@ int pthread_attr_setscope (pthread_attr_t *, int); #ifdef _POSIX_THREAD_ATTR_STACKADDR /* These functions may be implementable via some low level trickery. For now they are - * Not supported or implemented. The prototypes are here so if someone greps the + * Not supported or implemented. The prototypes are here so if someone greps the * source they will see these comments */ int pthread_attr_getstackaddr (const pthread_attr_t *, void **); @@ -96,7 +96,7 @@ int pthread_attr_setstacksize (pthread_attr_t *, size_t); #endif int pthread_cancel (pthread_t); -/* Macros for cleanup_push and pop; +/* Macros for cleanup_push and pop; * The function definitions are void pthread_cleanup_push (void (*routine)(void*), void *arg); void pthread_cleanup_pop (int execute); diff --git a/winsup/cygwin/include/sys/resource.h b/winsup/cygwin/include/sys/resource.h index c68a206..c1fe544 100644 --- a/winsup/cygwin/include/sys/resource.h +++ b/winsup/cygwin/include/sys/resource.h @@ -50,16 +50,16 @@ struct rusage { long ru_ixrss; /* XXX: 0 */ long ru_idrss; /* XXX: sum of rm_asrss */ long ru_isrss; /* XXX: 0 */ - long ru_minflt; /* any page faults not requiring I/O */ - long ru_majflt; /* any page faults requiring I/O */ - long ru_nswap; /* swaps */ - long ru_inblock; /* block input operations */ - long ru_oublock; /* block output operations */ - long ru_msgsnd; /* messages sent */ - long ru_msgrcv; /* messages received */ - long ru_nsignals; /* signals received */ - long ru_nvcsw; /* voluntary context switches */ - long ru_nivcsw; /* involuntary " */ + long ru_minflt; /* any page faults not requiring I/O */ + long ru_majflt; /* any page faults requiring I/O */ + long ru_nswap; /* swaps */ + long ru_inblock; /* block input operations */ + long ru_oublock; /* block output operations */ + long ru_msgsnd; /* messages sent */ + long ru_msgrcv; /* messages received */ + long ru_nsignals; /* signals received */ + long ru_nvcsw; /* voluntary context switches */ + long ru_nivcsw; /* involuntary " */ #define ru_last ru_nivcsw }; diff --git a/winsup/cygwin/include/sys/soundcard.h b/winsup/cygwin/include/sys/soundcard.h index 1a40bff..05b0609 100644 --- a/winsup/cygwin/include/sys/soundcard.h +++ b/winsup/cygwin/include/sys/soundcard.h @@ -53,10 +53,10 @@ #define SNDCARD_UART6850 8 #define SNDCARD_GUS16 9 #define SNDCARD_MSS 10 -#define SNDCARD_PSS 11 +#define SNDCARD_PSS 11 #define SNDCARD_SSCAPE 12 -#define SNDCARD_PSS_MPU 13 -#define SNDCARD_PSS_MSS 14 +#define SNDCARD_PSS_MPU 13 +#define SNDCARD_PSS_MSS 14 #define SNDCARD_SSCAPE_MSS 15 #define SNDCARD_TRXPRO 16 #define SNDCARD_TRXPRO_SB 17 @@ -194,7 +194,7 @@ typedef struct seq_event_rec { * Gravis UltraSound. It tries to be universal format for uploading * sample based patches but is probably too limited. * - * (PBD) As Hannu guessed, the GUS structure is too limited for + * (PBD) As Hannu guessed, the GUS structure is too limited for * the WaveFront, but this is the right place for a constant definition. */ @@ -220,7 +220,7 @@ struct patch_info { #define WAVE_SUSTAIN_ON 0x20 /* bit 5 = Turn sustaining on. (Env. pts. 3)*/ #define WAVE_ENVELOPES 0x40 /* bit 6 = Enable envelopes - 1 */ #define WAVE_FAST_RELEASE 0x80 /* bit 7 = Shut off immediately after note off */ - /* (use the env_rate/env_offs fields). */ + /* (use the env_rate/env_offs fields). */ /* Linux specific bits */ #define WAVE_VIBRATO 0x00010000 /* The vibrato info is valid */ #define WAVE_TREMOLO 0x00020000 /* The tremolo info is valid */ @@ -234,7 +234,7 @@ struct patch_info { int len; /* Size of the wave data in bytes */ int loop_start, loop_end; /* Byte offsets from the beginning */ -/* +/* * The base_freq and base_note fields are used when computing the * playback speed for a note. The base_note defines the tone frequency * which is heard if the sample is played using the base_freq as the @@ -263,7 +263,7 @@ struct patch_info { unsigned char env_rate[ 6 ]; /* GUS HW ramping rate */ unsigned char env_offset[ 6 ]; /* 255 == 100% */ - /* + /* * The tremolo, vibrato and scale info are not supported yet. * Enable by setting the mode bits WAVE_TREMOLO, WAVE_VIBRATO or * WAVE_SCALE @@ -280,10 +280,10 @@ struct patch_info { int scale_frequency; unsigned int scale_factor; /* from 0 to 2048 or 0 to 2 */ - int volume; + int volume; int fractions; int reserved1; - int spare[2]; + int spare[2]; char data[1]; /* The waveform data starts here */ }; @@ -300,7 +300,7 @@ struct sysex_info { * /dev/sequencer input events. * * The data written to the /dev/sequencer is a stream of events. Events - * are records of 4 or 8 bytes. The first byte defines the size. + * are records of 4 or 8 bytes. The first byte defines the size. * Any number of events can be written with a write call. There * is a set of macros for sending these events. Use these macros if you * want to maximize portability of your program. @@ -433,13 +433,13 @@ struct sysex_info { * of the associated synthesizer device. There is no limit to the size * of the extended events. These events are not queued but executed * immediately when the write() is called (execution can take several - * seconds of time). + * seconds of time). * * When a SEQ_FULLSIZE message is written to the device, it must * be written using exactly one write() call. Other events cannot * be mixed to the same write. * - * For FM synths (YM3812/OPL3) use struct sbi_instrument and write it to the + * For FM synths (YM3812/OPL3) use struct sbi_instrument and write it to the * /dev/sequencer. Don't write other data together with the instrument structure * Set the key field of the structure to FM_PATCH. The device field is used to * route the patch to the corresponding device. @@ -461,7 +461,7 @@ struct sbi_instrument { #define FM_PATCH _PATCHKEY(0x01) #define OPL3_PATCH _PATCHKEY(0x03) short device; /* Synth# (0-4) */ - int channel; /* Program# to be initialized */ + int channel; /* Program# to be initialized */ sbi_instr_data operators; /* Register settings for operator cells (.SBI format) */ }; @@ -625,7 +625,7 @@ typedef struct buffmem_desc { /* * Application's profile defines the way how playback underrun situations should be handled. - * + * * APF_NORMAL (the default) and APF_NETWORK make the driver to cleanup the * playback buffer whenever an underrun occurs. This consumes some time * prevents looping the existing buffer. @@ -711,11 +711,11 @@ typedef struct copr_msg { * IOCTL commands for /dev/mixer */ -/* +/* * Mixer devices * * There can be up to 20 different analog mixer channels. The - * SOUND_MIXER_NRDEVICES gives the currently supported maximum. + * SOUND_MIXER_NRDEVICES gives the currently supported maximum. * The SOUND_MIXER_READ_DEVMASK returns a bitmask which tells * the devices supported by the particular mixer. */ @@ -735,7 +735,7 @@ typedef struct copr_msg { #define SOUND_MIXER_RECLEV 11 /* Recording level */ #define SOUND_MIXER_IGAIN 12 /* Input gain */ #define SOUND_MIXER_OGAIN 13 /* Output gain */ -/* +/* * The AD1848 codec and compatibles have three line level inputs * (line, aux1 and aux2). Since each card manufacturer have assigned * different meanings to these inputs, it's inpractical to assign @@ -940,7 +940,7 @@ typedef struct mixer_vol_table { #define SOUND_MIXER_GETLEVELS _SIOWR('M', 116, mixer_vol_table) #define SOUND_MIXER_SETLEVELS _SIOWR('M', 117, mixer_vol_table) -/* +/* * An ioctl for identifying the driver version. It will return value * of the SOUND_VERSION macro used when compiling the driver. * This call was introduced in OSS version 3.6 and it will not work @@ -954,7 +954,7 @@ typedef struct mixer_vol_table { /* * The 4 most significant bits of byte 0 specify the class of - * the event: + * the event: * * 0x8X = system level events, * 0x9X = device/port specific events, event[1] = device/port, @@ -1014,7 +1014,7 @@ typedef struct mixer_vol_table { */ #define LOCL_STARTAUDIO 1 -#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) +#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS) /* * Some convenience macros to simplify programming of the * /dev/sequencer interface @@ -1087,16 +1087,16 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); /* * This variation of the sequencer macros is used just to format one event * using fixed buffer. - * + * * The program using the macro library must define the following macros before * using this library. * - * #define _seqbuf name of the buffer (unsigned char[]) + * #define _seqbuf name of the buffer (unsigned char[]) * #define _SEQ_ADVBUF(len) If the applic needs to know the exact * size of the event, this macro can be used. * Otherwise this must be defined as empty. * #define _seqbufptr Define the name of index variable or 0 if - * not required. + * not required. */ #define _SEQ_NEEDBUF(len) /* empty */ #endif @@ -1157,7 +1157,7 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); * sending any MIDI bytes but it's absolutely not possible. Trying to do * so _will_ cause problems with MPU401 intelligent mode). * - * Sysex messages are sent in blocks of 1 to 6 bytes. Longer messages must be + * Sysex messages are sent in blocks of 1 to 6 bytes. Longer messages must be * sent by calling SEQ_SYSEX() several times (there must be no other events * between them). First sysex fragment must have 0xf0 in the first byte * and the last byte (buf[len-1] of the last fragment must be 0xf7. No byte @@ -1225,11 +1225,11 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); */ #define _TIMER_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ - _seqbuf[_seqbufptr+0] = EV_TIMING; \ - _seqbuf[_seqbufptr+1] = (ev); \ + _seqbuf[_seqbufptr+0] = EV_TIMING; \ + _seqbuf[_seqbufptr+1] = (ev); \ _seqbuf[_seqbufptr+2] = 0;\ _seqbuf[_seqbufptr+3] = 0;\ - *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ + *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ _SEQ_ADVBUF(8);} #define SEQ_START_TIMER() _TIMER_EVENT(TMR_START, 0) @@ -1247,16 +1247,16 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len); */ #define _LOCAL_EVENT(ev, parm) {_SEQ_NEEDBUF(8);\ - _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \ - _seqbuf[_seqbufptr+1] = (ev); \ + _seqbuf[_seqbufptr+0] = EV_SEQ_LOCAL; \ + _seqbuf[_seqbufptr+1] = (ev); \ _seqbuf[_seqbufptr+2] = 0;\ _seqbuf[_seqbufptr+3] = 0;\ - *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ + *(unsigned int *)&_seqbuf[_seqbufptr+4] = (parm); \ _SEQ_ADVBUF(8);} #define SEQ_PLAYAUDIO(devmask) _LOCAL_EVENT(LOCL_STARTAUDIO, devmask) /* - * Events for the level 1 interface only + * Events for the level 1 interface only */ #define SEQ_MIDIOUT(device, byte) {_SEQ_NEEDBUF(4);\ diff --git a/winsup/cygwin/include/sys/un.h b/winsup/cygwin/include/sys/un.h index 25588e2..4e3eee8 100644 --- a/winsup/cygwin/include/sys/un.h +++ b/winsup/cygwin/include/sys/un.h @@ -21,6 +21,6 @@ struct sockaddr_un { /* Evaluates the actual length of `sockaddr_un' structure. */ #define SUN_LEN(p) ((size_t)(((struct sockaddr_un *) NULL)->sun_path) \ - + strlen ((p)->sun_path)) + + strlen ((p)->sun_path)) #endif diff --git a/winsup/cygwin/lib/dll_main.cc b/winsup/cygwin/lib/dll_main.cc index e4486a3..a224a0a 100644 --- a/winsup/cygwin/lib/dll_main.cc +++ b/winsup/cygwin/lib/dll_main.cc @@ -15,7 +15,7 @@ details. */ extern "C" BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, - LPVOID reserved /* Not used. */); + LPVOID reserved /* Not used. */); BOOL APIENTRY DllMain ( diff --git a/winsup/cygwin/lib/getopt.c b/winsup/cygwin/lib/getopt.c index 12763ea..c6f967d 100644 --- a/winsup/cygwin/lib/getopt.c +++ b/winsup/cygwin/lib/getopt.c @@ -147,7 +147,7 @@ gcd(a, b) b = c; c = a % b; } - + return b; } @@ -245,7 +245,7 @@ start: place = EMSG; if (IN_ORDER) { /* - * GNU extension: + * GNU extension: * return non-option as argument to option 1 */ optarg = nargv[optind++]; @@ -291,7 +291,7 @@ start: } if (optchar == 'W' && oli[1] == ';') { /* -W long-option */ /* XXX: what if no long options provided (called by getopt)? */ - if (*place) + if (*place) return -2; if (++optind >= nargc) { /* no arg */ @@ -411,7 +411,7 @@ getopt_long(int nargc, char * const *nargv, const char *options, has_equal++; } else current_argv_len = strlen(current_argv); - + for (i = 0; long_options[i].name; i++) { /* find matching long option */ if (strncmp(current_argv, long_options[i].name, @@ -436,7 +436,7 @@ getopt_long(int nargc, char * const *nargv, const char *options, } } if (match != -1) { /* option found */ - if (long_options[match].has_arg == no_argument + if (long_options[match].has_arg == no_argument && has_equal) { if (PRINT_ERROR) warnx(noarg, (int)current_argv_len, @@ -492,7 +492,7 @@ getopt_long(int nargc, char * const *nargv, const char *options, if (long_options[match].flag) { *long_options[match].flag = long_options[match].val; retval = 0; - } else + } else retval = long_options[match].val; if (idx) *idx = match; diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 664ce95..ab36a52 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -503,7 +503,7 @@ mmap (caddr_t addr, size_t len, int prot, int flags, int fd, off_t off) While the changes are not propagated to the file, they are visible to other processes sharing the same file mapping object. Workaround: Don't use named file mapping. That should work since - sharing file mappings only works reliable using named + sharing file mappings only works reliable using named file mapping on 9x. */ if ((flags & MAP_PRIVATE) diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index 9e2984f..445a353 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1573,10 +1573,10 @@ get_2k_ifconf (struct ifconf *ifc, int what) { /* Iterate over all known interfaces */ for (if_cnt = 0; if_cnt < ift->dwNumEntries; ++if_cnt) - { + { *sub = '0'; /* Iterate over all configured IP-addresses */ - for (ip_cnt = 0; ip_cnt < ipt->dwNumEntries; ++ip_cnt) + for (ip_cnt = 0; ip_cnt < ipt->dwNumEntries; ++ip_cnt) { /* Does the IP address belong to the interface? */ if (ipt->table[ip_cnt].dwIndex == ift->table[if_cnt].dwIndex) @@ -1997,29 +1997,29 @@ get_95_ifconf (struct ifconf *ifc, int what) strcat (netname, ifname); if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, netname, - 0, KEY_READ, &subkey) != ERROR_SUCCESS) + 0, KEY_READ, &subkey) != ERROR_SUCCESS) { - RegCloseKey (ifkey); - --ifr; - continue; + RegCloseKey (ifkey); + --ifr; + continue; } if (RegQueryValueEx (subkey, "AdapterName", 0, - NULL, (unsigned char *) adapter, - (size = sizeof adapter, &size)) == ERROR_SUCCESS - && strcasematch (adapter, "MS$PPP")) + NULL, (unsigned char *) adapter, + (size = sizeof adapter, &size)) == ERROR_SUCCESS + && strcasematch (adapter, "MS$PPP")) { - ++*ppp; - strcpy (ifr->ifr_name, "ppp"); - strcat (ifr->ifr_name, ppp); + ++*ppp; + strcpy (ifr->ifr_name, "ppp"); + strcat (ifr->ifr_name, ppp); } else { - ++*eth; - strcpy (ifr->ifr_name, "eth"); - strcat (ifr->ifr_name, eth); + ++*eth; + strcpy (ifr->ifr_name, "eth"); + strcat (ifr->ifr_name, eth); } - + RegCloseKey (subkey); RegCloseKey (ifkey); diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 3115d3b..130f45d 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -861,7 +861,7 @@ get_devn (const char *name, int &unit) /* major minor POSIX filename NT filename - ----- ----- -------------- ------------------------- + ----- ----- -------------- ------------------------- FH_TAPE 0 /dev/st0 \device\tape0 FH_TAPE 1 /dev/st1 \device\tape1 ... @@ -947,7 +947,7 @@ get_raw_device_number (const char *name, const char *w32_path, int &unit) else /* Backward compatible checking of mount table device mapping. */ { if (wdeveqn ("tape", 4)) - { + { unit = digits (w32_path + 4); /* Norewind tape devices have leading n in name. */ if (deveqn ("n", 1)) @@ -955,12 +955,12 @@ get_raw_device_number (const char *name, const char *w32_path, int &unit) devn = FH_TAPE; } else if (wdeveqn ("physicaldrive", 13)) - { + { unit = digits (w32_path + 13) * 16 + 32; devn = FH_FLOPPY; } else if (isdrive (w32_path)) - { + { unit = cyg_tolower (w32_path[0]) - 'a' + 224; devn = FH_FLOPPY; } @@ -969,7 +969,7 @@ get_raw_device_number (const char *name, const char *w32_path, int &unit) } static int __stdcall get_device_number (const char *unix_path, - const char *w32_path, int &unit) + const char *w32_path, int &unit) __attribute__ ((regparm(3))); static int __stdcall get_device_number (const char *unix_path, const char *w32_path, int &unit) @@ -1020,12 +1020,12 @@ win32_device_name (const char *src_path, char *win32_path, { case FH_RANDOM: __small_sprintf (win32_path, devfmt, unit == 8 ? "" : "u"); - break; + break; case FH_TAPE: - __small_sprintf (win32_path, "\\Device\\Tape%d", unit % 128); - break; + __small_sprintf (win32_path, "\\Device\\Tape%d", unit % 128); + break; case FH_FLOPPY: - if (unit < 16) + if (unit < 16) __small_sprintf (win32_path, "\\Device\\Floppy%d", unit); else if (unit < 32) __small_sprintf (win32_path, "\\Device\\CdRom%d", unit - 16); @@ -1034,10 +1034,10 @@ win32_device_name (const char *src_path, char *win32_path, (unit - 32) / 16, unit % 16); else __small_sprintf (win32_path, "\\DosDevices\\%c:", unit - 224 + 'A'); - break; + break; default: __small_sprintf (win32_path, devfmt, unit); - break; + break; } return TRUE; } @@ -2541,7 +2541,7 @@ symlink (const char *topath, const char *frompath) /* POSIX says that empty 'frompath' is invalid input whlie empty 'topath' is valid -- it's symlink resolver job to verify if - symlink contents point to existing filesystem object */ + symlink contents point to existing filesystem object */ if (check_null_empty_str_errno (topath) == EFAULT || check_null_empty_str_errno (frompath)) goto done; diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 0f3409a..766c2a2 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -159,7 +159,7 @@ enum fe_types FE_CWD = 4 /* Search CWD for program */ }; const char * __stdcall find_exec (const char *name, path_conv& buf, - const char *winenv = "PATH=", + const char *winenv = "PATH=", unsigned opt = FE_NADA, const char **known_suffix = NULL) __attribute__ ((regparm(3))); diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index b8787fe..6e5266d 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -176,7 +176,7 @@ make_pipe (int fildes[2], unsigned int psize, int mode) } syscall_printf ("%d = make_pipe ([%d, %d], %d, %p)", res, fildes[0], - fildes[1], psize, mode); + fildes[1], psize, mode); return res; } diff --git a/winsup/cygwin/poll.cc b/winsup/cygwin/poll.cc index 017d0e5..76f8c35 100644 --- a/winsup/cygwin/poll.cc +++ b/winsup/cygwin/poll.cc @@ -56,7 +56,7 @@ poll (struct pollfd *fds, unsigned int nfds, int timeout) if (!cygheap->fdtab.not_open (fds[i].fd)) { valid_fds = true; - fds[i].revents = 0; + fds[i].revents = 0; FD_SET (fds[i].fd, open_fds); if (fds[i].events & POLLIN) FD_SET (fds[i].fd, read_fds); diff --git a/winsup/cygwin/pwdgrp.h b/winsup/cygwin/pwdgrp.h index 38a7c80..568259d 100644 --- a/winsup/cygwin/pwdgrp.h +++ b/winsup/cygwin/pwdgrp.h @@ -27,17 +27,17 @@ public: operator pwdgrp_state () { if (state != uninitialized && file_w32[0] && cygheap->etc_changed ()) - { - HANDLE h; - WIN32_FIND_DATA data; - - if ((h = FindFirstFile (file_w32, &data)) != INVALID_HANDLE_VALUE) - { - if (CompareFileTime (&data.ftLastWriteTime, &last_modified) > 0) - state = uninitialized; - FindClose (h); - } - } + { + HANDLE h; + WIN32_FIND_DATA data; + + if ((h = FindFirstFile (file_w32, &data)) != INVALID_HANDLE_VALUE) + { + if (CompareFileTime (&data.ftLastWriteTime, &last_modified) > 0) + state = uninitialized; + FindClose (h); + } + } return state; } void operator = (pwdgrp_state nstate) @@ -47,7 +47,7 @@ public: void set_last_modified (FILE *f) { if (!file_w32[0]) - strcpy (file_w32, cygheap->fdtab[fileno (f)]->get_win32_name ()); + strcpy (file_w32, cygheap->fdtab[fileno (f)]->get_win32_name ()); GetFileTime (cygheap->fdtab[fileno (f)]->get_handle (), NULL, NULL, &last_modified); diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 934ceed..cf30386 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -542,7 +542,7 @@ get_group_sidlist (const char *logonserver, cygsidlist &grp_list, if (get_supplementary_group_sidlist (user, sup_list)) { for (int i = 0; i < sup_list.count; ++i) - if (!grp_list.contains (sup_list.sids[i])) + if (!grp_list.contains (sup_list.sids[i])) grp_list += sup_list.sids[i]; } return TRUE; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index bf26242..7b3fc32 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -286,7 +286,7 @@ select_stuff::wait (fd_set *readfds, fd_set *writefds, fd_set *exceptfds, s = &start; int gotone = FALSE; /* Some types of object (e.g., consoles) wake up on "inappropriate" events - like mouse movements. The verify function will detect these situations. + like mouse movements. The verify function will detect these situations. If it returns false, then this wakeup was a false alarm and we should go back to waiting. */ while ((s = s->next)) @@ -671,7 +671,7 @@ peek_console (select_record *me, bool) return me->write_ready; } - + static int verify_console (select_record *me, fd_set *rfds, fd_set *wfds, fd_set *efds) diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc index 0158487..ab748e5 100644 --- a/winsup/cygwin/shared.cc +++ b/winsup/cygwin/shared.cc @@ -153,7 +153,7 @@ memory_init () heap_init (); mount_table = (mount_info *) open_shared (user_name, MOUNT_VERSION, - cygwin_mount_h, + cygwin_mount_h, sizeof (mount_info), 0); debug_printf ("opening mount table for '%s' at %p", cygheap->user.name (), mount_table_address); diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 0c6eb5c..72fb649 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -366,7 +366,7 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv, } init_child_info (chtype, &ciresrv, (mode == _P_OVERLAY) ? myself->pid : 1, - spr); + spr); if (!DuplicateHandle (hMainProc, hMainProc, hMainProc, &ciresrv.parent, 0, 1, DUPLICATE_SAME_ACCESS)) { @@ -496,7 +496,7 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv, newargv.unshift (arg1); /* FIXME: This should not be using FE_NATIVE. It should be putting - the posix path on the argv list. */ + the posix path on the argv list. */ find_exec (pgm, real_path, "PATH=", FE_NATIVE, &ext); newargv.unshift (real_path, 1); } @@ -779,7 +779,7 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv, child.remember (); strcpy (child->progname, real_path); /* FIXME: This introduces an unreferenced, open handle into the child. - The purpose is to keep the pid shared memory open so that all of + The purpose is to keep the pid shared memory open so that all of the fields filled out by child.remember do not disappear and so there is not a brief period during which the pid is not available. However, we should try to find another way to do this eventually. */ diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 4baf472..3b2104d 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -187,7 +187,7 @@ _unlink (const char *ourname) bool delete_on_close_ok; delete_on_close_ok = !win32_name.isremote () - && wincap.has_delete_on_close (); + && wincap.has_delete_on_close (); /* Attempt to use "delete on close" semantics to handle removing a file which may be open. */ @@ -319,7 +319,7 @@ _read (int fd, void *ptr, size_t len) } /* FIXME: This is not thread safe. We need some method to - ensure that an fd, closed in another thread, aborts I/O + ensure that an fd, closed in another thread, aborts I/O operations. */ if (!cfd.isopen()) return -1; @@ -347,7 +347,7 @@ _read (int fd, void *ptr, size_t len) } syscall_printf ("%d = read (%d, %p, %d), errno %d", res, fd, ptr, len, - get_errno ()); + get_errno ()); MALLOC_CHECK; return res; } @@ -503,7 +503,7 @@ _open (const char *unix_path, int flags, ...) { path_conv pc; if (!(fh = cygheap->fdtab.build_fhandler_from_name (fd, unix_path, - NULL, pc))) + NULL, pc))) res = -1; // errno already set else if (!fh->open (&pc, flags, (mode & 07777) & ~cygheap->umask)) { @@ -576,7 +576,7 @@ isatty (int fd) cygheap_fdget cfd (fd); if (cfd < 0) res = 0; - else + else res = cfd->is_tty (); syscall_printf ("%d = isatty (%d)", res, fd); return res; @@ -784,7 +784,7 @@ chown_worker (const char *name, unsigned fmode, uid_t uid, gid_t gid) if (win32_path.isdir()) attrib |= S_IFDIR; res = set_file_attribute (win32_path.has_acls (), win32_path, uid, - gid, attrib, cygheap->user.logsrv ()); + gid, attrib, cygheap->user.logsrv ()); } if (res != 0 && (!win32_path.has_acls () || !allow_ntsec)) { @@ -1029,7 +1029,7 @@ stat_worker (const char *name, struct stat *buf, int nofollow, path_conv *pc) else { debug_printf ("(%s, %p, %d, %p), file_attributes %d", name, buf, nofollow, - pc, (DWORD) real_path); + pc, (DWORD) real_path); memset (buf, 0, sizeof (struct stat)); res = fh->fstat (buf, pc); } @@ -2042,7 +2042,7 @@ seteuid (uid_t uid) user.token = cygheap->user.impersonated ? cygheap->user.token : INVALID_HANDLE_VALUE; /* Unsetting these both env vars is necessary to get NetUserGetInfo() - called in internal_getlogin (). Otherwise the wrong path is used + called in internal_getlogin (). Otherwise the wrong path is used after a user switch, probably. */ unsetenv ("HOMEDRIVE"); unsetenv ("HOMEPATH"); diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc index a005c7e..efc3e5d 100644 --- a/winsup/cygwin/sysconf.cc +++ b/winsup/cygwin/sysconf.cc @@ -89,7 +89,7 @@ sysconf (int in) return sbi.HighestPhysicalPage - sbi.LowestPhysicalPage + 1; } } - break; + break; } /* Invalid input or unimplemented sysconf name */ diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index 8b6f1b6..87e926d 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -1767,7 +1767,7 @@ __pthread_cond_dowait (pthread_cond_t *cond, pthread_mutex_t *mutex, if (pthread_mutex_unlock (&(*cond)->cond_access)) system_printf ("Failed to unlock condition variable access mutex, this %0p\n", *cond); rv = (*cond)->TimedWait (waitlength); - /* this may allow a race on the mutex acquisition and waits.. + /* this may allow a race on the mutex acquisition and waits.. * But doing this within the cond access mutex creates a different race */ bool last = false; @@ -1964,11 +1964,11 @@ __pthread_mutex_lock (pthread_mutex_t *mutex) break; case VALID_STATIC_OBJECT: if (*mutex == PTHREAD_MUTEX_INITIALIZER) - { - int rv = __pthread_mutex_init (mutex, NULL); - if (rv) + { + int rv = __pthread_mutex_init (mutex, NULL); + if (rv) return rv; - } + } break; case VALID_OBJECT: break; diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index c724bea..c1c0e19 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -164,7 +164,7 @@ public: ~verifyable_object (); }; -typedef enum +typedef enum { VALID_OBJECT, INVALID_OBJECT, diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc index 29f1197..c128d8a 100644 --- a/winsup/cygwin/uinfo.cc +++ b/winsup/cygwin/uinfo.cc @@ -85,7 +85,7 @@ internal_getlogin (cygheap_user &user) * only obtain HOMEDRIVE and HOMEPATH if they are not already set * in the environment. */ if (!getenv ("HOMEPATH") || !getenv ("HOMEDRIVE")) - { + { LPUSER_INFO_3 ui = NULL; WCHAR wuser[UNLEN + 1]; @@ -98,7 +98,7 @@ internal_getlogin (cygheap_user &user) strcat (strcpy (buf, "\\\\"), user.logsrv ()); sys_mbstowcs (wlogsrv, buf, - sizeof (wlogsrv) / sizeof(*wlogsrv)); + sizeof (wlogsrv) / sizeof(*wlogsrv)); ret = NetUserGetInfo (wlogsrv, wuser, 3,(LPBYTE *)&ui); } } @@ -218,7 +218,7 @@ internal_getlogin (cygheap_user &user) { const char *homedrive, *homepath; if (pw && pw->pw_dir && *pw->pw_dir) - { + { setenv ("HOME", pw->pw_dir, 1); debug_printf ("Set HOME (from /etc/passwd) to %s", pw->pw_dir); } diff --git a/winsup/cygwin/uname.cc b/winsup/cygwin/uname.cc index 80bd319..aff1583 100644 --- a/winsup/cygwin/uname.cc +++ b/winsup/cygwin/uname.cc @@ -24,7 +24,7 @@ uname (struct utsname *name) if (check_null_invalid_struct_errno (name)) return -1; - + char *snp = strstr (cygwin_version.dll_build_date, "SNP"); memset (name, 0, sizeof (*name)); diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index ad1459b..14211a5 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -430,9 +430,9 @@ wincapc::init () case 4: os = "NT"; if (strcmp (version.szCSDVersion, "Service Pack 4") < 0) - caps = &wincap_nt4; + caps = &wincap_nt4; else - caps = &wincap_nt4sp4; + caps = &wincap_nt4sp4; break; case 5: os = "NT"; @@ -446,7 +446,7 @@ wincapc::init () caps = &wincap_unknown; break; } - break; + break; case VER_PLATFORM_WIN32_WINDOWS: switch (version.dwMinorVersion) { @@ -460,9 +460,9 @@ wincapc::init () case 10: os = "98"; if (strchr(version.szCSDVersion, 'A')) - caps = &wincap_98se; + caps = &wincap_98se; else - caps = &wincap_98; + caps = &wincap_98; break; case 90: os = "ME"; @@ -473,9 +473,9 @@ wincapc::init () caps = &wincap_unknown; break; } - break; + break; default: - os = "??"; + os = "??"; caps = &wincap_unknown; break; } diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/wincap.h index 6687e93..a3cd317 100644 --- a/winsup/cygwin/wincap.h +++ b/winsup/cygwin/wincap.h @@ -12,7 +12,7 @@ details. */ #define _WINCAP_H struct wincaps -{ +{ DWORD lock_file_highword; DWORD chunksize; int shared; @@ -58,7 +58,7 @@ public: void init (); void set_chunksize (DWORD nchunksize); - + const char *osname () const { return osnam; } #define IMPLEMENT(cap) cap() const { return ((wincaps *)this->caps)->cap; } -- cgit v1.1