summaryrefslogtreecommitdiff
path: root/lib/sockets.h
Commit message (Collapse)AuthorAgeFilesLines
* Add more reminders to include <config.h>.Bruno Haible2023-04-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * m4/gnulib-common.m4 (gl_COMMON): In config.h, define _GL_CONFIG_H_INCLUDED. * lib/acl-internal.h: Test _GL_CONFIG_H_INCLUDED instead of _GL_INLINE_HEADER_BEGIN. * lib/alignalloc.h: Likewise. * lib/argp-fmtstream.h: Likewise. * lib/argp.h: Likewise. * lib/binary-io.h: Likewise. * lib/bitrotate.h: Likewise. * lib/c-ctype.h: Likewise. * lib/count-leading-zeros.h: Likewise. * lib/count-one-bits.h: Likewise. * lib/count-trailing-zeros.h: Likewise. * lib/eealloc.h: Likewise. * lib/execinfo.in.h: Likewise. * lib/gethrxtime.h: Likewise. * lib/gl_list.h: Likewise. * lib/gl_map.h: Likewise. * lib/gl_omap.h: Likewise. * lib/gl_openssl.h: Likewise. * lib/gl_oset.h: Likewise. * lib/gl_set.h: Likewise. * lib/gl_xlist.h: Likewise. * lib/gl_xmap.h: Likewise. * lib/gl_xomap.h: Likewise. * lib/gl_xoset.h: Likewise. * lib/gl_xset.h: Likewise. * lib/gl_xsublist.h: Likewise. * lib/glthread/cond.h: Likewise. * lib/hamt.h: Likewise. * lib/ialloc.h: Likewise. * lib/math.in.h: Likewise. * lib/mbchar.h: Likewise. * lib/mbfile.h: Likewise. * lib/mbiter.h: Likewise. * lib/mbuiter.h: Likewise. * lib/openat.h: Likewise. * lib/pipe-filter-aux.h: Likewise. * lib/priv-set.h: Likewise. * lib/safe-alloc.h: Likewise. * lib/savewd.h: Likewise. * lib/se-context.in.h: Likewise. * lib/se-label.in.h: Likewise. * lib/se-selinux.in.h: Likewise. * lib/sig-handler.h: Likewise. * lib/stat-time.h: Likewise. * lib/string-desc-quotearg.h: Likewise. * lib/string-desc.h: Likewise. * lib/sys_socket.in.h: Likewise. * lib/timespec.h: Likewise. * lib/u64.h: Likewise. * lib/uchar.in.h: Likewise. * lib/unistd.in.h: Likewise. * lib/utimens.h: Likewise. * lib/wctype.in.h: Likewise. * lib/xalloc.h: Likewise. * lib/xbinary-io.h: Likewise. * lib/xsize.h: Likewise. * lib/xstring-desc.h: Likewise. * lib/xtime.h: Likewise. * lib/acl.h: Check that config.h was already included. * lib/alignof.h: Likewise. * lib/argmatch.h: Likewise. * lib/argv-iter.h: Likewise. * lib/arpa_inet.in.h: Likewise. * lib/attribute.h: Likewise. * lib/backupfile.h: Likewise. * lib/base32.h: Likewise. * lib/base64.h: Likewise. * lib/basename-lgpl.h: Likewise. * lib/bitset.h: Likewise. * lib/bitsetv.h: Likewise. * lib/c-snprintf.h: Likewise. * lib/c-stack.h: Likewise. * lib/c-strcase.h: Likewise. * lib/c-vasnprintf.h: Likewise. * lib/c-vasprintf.h: Likewise. * lib/c-vsnprintf.h: Likewise. * lib/c-xvasprintf.h: Likewise. * lib/canon-host.h: Likewise. * lib/canonicalize.h: Likewise. * lib/clean-temp.h: Likewise. * lib/concat-filename.h: Likewise. * lib/ctype.in.h: Likewise. * lib/dfa.h: Likewise. * lib/di-set.h: Likewise. * lib/dirent-safer.h: Likewise. * lib/dirent.in.h: Likewise. * lib/dirname.h: Likewise. * lib/eloop-threshold.h: Likewise. * lib/error.in.h: Likewise. * lib/exclude.h: Likewise. * lib/fatal-signal.h: Likewise. * lib/fcntl.in.h: Likewise. * lib/file-type.h: Likewise. * lib/filenamecat.h: Likewise. * lib/filevercmp.h: Likewise. * lib/flexmember.h: Likewise. * lib/fnmatch.in.h: Likewise. * lib/fpending.h: Likewise. * lib/freadable.h: Likewise. * lib/freadahead.h: Likewise. * lib/freading.h: Likewise. * lib/fts_.h: Likewise. * lib/fwritable.h: Likewise. * lib/fwriting.h: Likewise. * lib/gc.h: Likewise. * lib/get_progname_of.h: Likewise. * lib/glob.in.h: Likewise. * lib/glthread/thread.h: Likewise. * lib/hash-pjw-bare.h: Likewise. * lib/hash-pjw.h: Likewise. * lib/hash-triple.h: Likewise. * lib/hash.h: Likewise. * lib/i-ring.h: Likewise. * lib/iconv.in.h: Likewise. * lib/ino-map.h: Likewise. * lib/inttostr.h: Likewise. * lib/inttypes.in.h: Likewise. * lib/javaversion.h: Likewise. * lib/langinfo.in.h: Likewise. * lib/locale.in.h: Likewise. * lib/localename.h: Likewise. * lib/malloc.in.h: Likewise. * lib/malloca.h: Likewise. * lib/memcasecmp.h: Likewise. * lib/memchr2.h: Likewise. * lib/memcmp2.h: Likewise. * lib/modechange.h: Likewise. * lib/monetary.in.h: Likewise. * lib/mountlist.h: Likewise. * lib/netdb.in.h: Likewise. * lib/obstack.h: Likewise. * lib/opendirat.h: Likewise. * lib/pagealign_alloc.h: Likewise. * lib/pipe-filter.h: Likewise. * lib/poll.in.h: Likewise. * lib/pthread.in.h: Likewise. * lib/pty.in.h: Likewise. * lib/quotearg.h: Likewise. * lib/read-file.h: Likewise. * lib/readline.h: Likewise. * lib/readutmp.h: Likewise. * lib/regex-quote.h: Likewise. * lib/relocatable.h: Likewise. * lib/savedir.h: Likewise. * lib/sched.in.h: Likewise. * lib/search.in.h: Likewise. * lib/sh-quote.h: Likewise. * lib/signal.in.h: Likewise. * lib/sigpipe-die.h: Likewise. * lib/sockets.h: Likewise. * lib/spawn.in.h: Likewise. * lib/ssfmalloc.h: Likewise. * lib/stack.h: Likewise. * lib/stdalign.in.h: Likewise. * lib/stdarg.in.h: Likewise. * lib/stddef.in.h: Likewise. * lib/stdio-safer.h: Likewise. * lib/stdio.in.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/stdnoreturn.in.h: Likewise. * lib/strerror-override.h: Likewise. * lib/striconv.h: Likewise. * lib/striconveh.h: Likewise. * lib/striconveha.h: Likewise. * lib/string-buffer.h: Likewise. * lib/string.in.h: Likewise. * lib/strings.in.h: Likewise. * lib/strnlen1.h: Likewise. * lib/sys_file.in.h: Likewise. * lib/sys_ioctl.in.h: Likewise. * lib/sys_random.in.h: Likewise. * lib/sys_resource.in.h: Likewise. * lib/sys_select.in.h: Likewise. * lib/sys_stat.in.h: Likewise. * lib/sys_time.in.h: Likewise. * lib/sys_times.in.h: Likewise. * lib/sys_utsname.in.h: Likewise. * lib/sys_wait.in.h: Likewise. * lib/system-quote.h: Likewise. * lib/term-style-control.h: Likewise. * lib/termios.in.h: Likewise. * lib/textstyle.in.h: Likewise. * lib/threads.in.h: Likewise. * lib/time.in.h: Likewise. * lib/trim.h: Likewise. * lib/utime.in.h: Likewise. * lib/utmp.in.h: Likewise. * lib/vasnprintf.h: Likewise. * lib/verror.h: Likewise. * lib/version-etc.h: Likewise. * lib/wchar.in.h: Likewise. * lib/windows-spawn.h: Likewise. * lib/windows-thread.h: Likewise. * lib/xgetcwd.h: Likewise. * lib/xgetdomainname.h: Likewise. * lib/xgethostname.h: Likewise. * lib/xmalloca.h: Likewise. * lib/xmemdup0.h: Likewise. * lib/xprintf.h: Likewise. * lib/xreadlink.h: Likewise. * lib/xstriconv.h: Likewise. * lib/xstriconveh.h: Likewise. * lib/xstrndup.h: Likewise. * lib/xstrtol-error.h: Likewise. * lib/xvasprintf.h: Likewise. * Makefile (config_h_MACROS*): New variables. (sc_check_config_h_reminder): New rule.
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* Put LGPLv2+ notices in source files where appropriate.Bruno Haible2021-06-041-7/+7
| | | | | * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* Implement a way to opt out from MSVC support.Bruno Haible2017-05-101-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for Emacs. * modules/msvc-nothrow (configure.ac): Invoke gl_MODULE_INDICATOR. * lib/accept4.c: Include <io.h> as an alternative to msvc-nothrow.h. * lib/error.c: Likewise. * lib/fcntl.c: Likewise. * lib/flock.c: Likewise. * lib/fstat.c: Likewise. * lib/fsync.c: Likewise. * lib/ioctl.c: Likewise. * lib/isapipe.c: Likewise. * lib/lseek.c: Likewise. * lib/nonblocking.c: Likewise. * lib/poll.c: Likewise. * lib/select.c: Likewise. * lib/sockets.h: Likewise. * lib/sockets.c: Likewise. * lib/stdio-read.c: Likewise. * lib/stdio-write.c: Likewise. * lib/utimens.c: Likewise. * lib/w32sock.h: Likewise. * lib/w32spawn.h: Likewise. * tests/test-cloexec.c: Likewise. * tests/test-dup-safer.c: Likewise. * tests/test-dup2.c: Likewise. * tests/test-dup3.c: Likewise. * tests/test-fcntl.c: Likewise. * tests/test-pipe.c: Likewise. * tests/test-pipe2.c: Likewise. * lib/ftruncate.c: Likewise. (chsize_nothrow): Renamed from chsize. * lib/msvc-nothrow.c: Don't include msvc-inval.h if HAVE_MSVC_INVALID_PARAMETER_HANDLER is not defined. * lib/close.c: Likewise. * lib/dup.c: Likewise. * lib/fclose.c: Likewise. * lib/raise.c: Likewise. * tests/test-fgetc.c: Likewise. * tests/test-fputc.c: Likewise. * tests/test-fread.c: Likewise. * tests/test-fwrite.c: Likewise. * lib/getdtablesize.c: Likewise. (_setmaxstdio_nothrow): Renamed from _setmaxstdio. * lib/isatty.c: Don't include msvc-inval.h if HAVE_MSVC_INVALID_PARAMETER_HANDLER is not defined. Include <io.h> as an alternative to msvc-nothrow.h. * lib/read.c: Likewise. * lib/write.c: Likewise. * lib/dup2.c: Likewise. (dup2_nothrow): New function. (ms_windows_dup2): Use it. * m4/close.m4 (gl_FUNC_CLOSE): Invoke gl_MSVC_INVAL and test HAVE_MSVC_INVALID_PARAMETER_HANDLER only if gl_MSVC_INVAL is defined. * m4/dup.m4 (gl_FUNC_DUP): Likewise. * m4/fdopen.m4 (gl_FUNC_FDOPEN): Likewise. * m4/raise.m4 (gl_FUNC_RAISE): Likewise. * m4/read.m4 (gl_FUNC_READ): Likewise. * m4/write.m4 (gl_FUNC_WRITE): Likewise. * doc/windows-without-msvc.texi: New file. * doc/gnulib.texi (Native Windows Support without MSVC Support): New section.
* Avoid -Wundef warning about undefined WINDOWS_SOCKETS.Tim Rühsen2017-01-071-3/+3
| | | | * lib/sockets.h: Test if WINDOWS_SOCKETS is defined.
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* sockets: MS Windows initalization fixesPaul Eggert2015-09-251-5/+5
| | | | | | | | | Problem reported by Test User in: http://lists.gnu.org/archive/html/help-shishi/2015-09/msg00001.html * lib/sockets.h (SOCKETS_1_0, SOCKETS_2_0, SOCKETS_2_1): Correct the endianness. * lib/sockets.c (gl_sockets_startup): Return 2 on any version number mismatch, not just on <. Cleanup before any such failure.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* mark functions with const and pure attributesJim Meyering2011-11-281-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark functions per suggestions from gcc-4.6 when using these options: -Wsuggest-attribute=pure -Wsuggest-attribute=const. Use gnulib's _GL_ATTRIBUTE_PURE and _GL_ATTRIBUTE_CONST macros. Follow these guidelines: when possible, apply the attribute to an extern declaration, not to its definition. Apply it to the definition only when the definition is static. * lib/argmatch.h (argmatch, argmatch_to_argument): Mark. * lib/argv-iter.h (argv_iter_n_args): Likewise. * lib/base64.h (isbase64): Likewise. * lib/basename-lgpl.c (last_component, base_len): Likewise. * lib/c-ctype.h (c_isascii, c_isalnum, c_isalpha): Likewise. (c_isblank, c_iscntrl, c_isdigit, c_islower, c_isgraph): Likewise. (c_isprint, c_ispunct, c_isspace, c_isupper, c_isxdigit): Likewise. (c_tolower, c_toupper): Likewise. * lib/c-strcase.h (c_strcasecmp, c_strncasecmp): Likewise. * lib/chdir-long.c (find_non_slash): Likewise. * lib/dirname.h (base_len, dir_len, last_component): Likewise. * lib/exclude.h (fnmatch_pattern_has_wildcards): Likewise. * lib/file-type.h (file_type): Likewise. * lib/filenamecat-lgpl.c (longest_relative_suffix): Likewise. * lib/filevercmp.c (verrevcmp): Likewise. * lib/freadahead.h (freadahead): Likewise. * lib/fts.c (fts_maxarglen): Likewise. * lib/hash-pjw.h (hash_pjw): Likewise. * lib/hash-triple.h (triple_hash_no_name, triple_compare_ino_str): * lib/hash.c (is_prime, next_prime): Likewise. * lib/hash.c (hash_get_n_buckets, hash_get_n_buckets_used): Likewise. (hash_get_n_entries, hash_get_max_bucket_length): Likewise. (hash_table_ok, hash_get_first, hash_string): Likewise. (compute_bucket_size): Likewise. * lib/i-ring.h (i_ring_empty): Likewise. * lib/isnan.c (isnanl): Likewise. * lib/math.h (isnanl, rpl_isnanl): Likewise. * lib/memcasecmp.h (memcasecmp): Likewise. * lib/memchr2.h (memchr2): Likewise. * lib/memcmp2.h (memcmp2): Likewise. * lib/parse-datetime.y (lookup_zone): Likewise. * lib/sockets.h (gl_sockets_startup, gl_sockets_cleanup) [!WINDOWS_SOCKETS]: Likewise. * lib/strnlen1.h (strnlen1): Likewise. * lib/uniwidth.in.h (uc_width): Likewise, but since this is installed as a public header by libunistring, it cannot depend on the macro definitions of gnulib-common.m4, so open-code the __attribute__... * lib/quotearg.c: Add pragma to avoid unwarranted suggestion from gcc's -Wsuggest-attribute=pure for quoting_options_from_style. (quoting_options_from_style): Add a comment. * lib/propername.h (proper_name): Add a comment.
* New module 'msvc-nothrow'. Makes _get_osfhandle safe on MSVC 9.Bruno Haible2011-09-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/msvc-nothrow.h: New file. * lib/msvc-nothrow.c: New file. * m4/msvc-nothrow.m4: New file. * modules/msvc-nothrow: New file. * lib/dup2.c: Include msvc-nothrow.h. (rpl_dup2): No need to protect _get_osfhandle call here. * lib/accept4.c: Include msvc-nothrow.h. * lib/error.c: Likewise. * lib/fcntl.c: Likewise. * lib/lseek.c: Likewise. * lib/nonblocking.c: Likewise. * lib/poll.c: Likewise. * lib/read.c: Likewise. * lib/select.c: Likewise. * lib/sockets.h: Likewise. * lib/sockets.c: Likewise. * lib/stdio-read.c: Likewise. * lib/stdio-write.c: Likewise. * lib/write.c: Likewise. * lib/w32sock.h: Likewise. * lib/w32spawn.h: Likewise. * lib/flock.c: Include msvc-nothrow.h instead of <io.h>. * lib/fsync.c: Likewise. * lib/isapipe.c: Likewise. * modules/dup2 (Depends-on): Add msvc-nothrow. * modules/accept4 (Depends-on): Likewise. * modules/error (Depends-on): Likewise. * modules/fcntl (Depends-on): Likewise. * modules/lseek (Depends-on): Likewise. * modules/nonblocking (Depends-on): Likewise. * modules/poll (Depends-on): Likewise. * modules/read (Depends-on): Likewise. * modules/select (Depends-on): Likewise. * modules/sockets (Depends-on): Likewise. * modules/sigpipe (Depends-on): Likewise. * modules/write (Depends-on): Likewise. * modules/accept (Depends-on): Likewise. * modules/bind (Depends-on): Likewise. * modules/connect (Depends-on): Likewise. * modules/gethostname (Depends-on): Likewise. * modules/getpeername (Depends-on): Likewise. * modules/getsockname (Depends-on): Likewise. * modules/getsockopt (Depends-on): Likewise. * modules/ioctl (Depends-on): Likewise. * modules/listen (Depends-on): Likewise. * modules/recv (Depends-on): Likewise. * modules/recvfrom (Depends-on): Likewise. * modules/send (Depends-on): Likewise. * modules/sendto (Depends-on): Likewise. * modules/setsockopt (Depends-on): Likewise. * modules/shutdown (Depends-on): Likewise. * modules/socket (Depends-on): Likewise. * modules/execute (Depends-on): Likewise. * modules/spawn-pipe (Depends-on): Likewise. * modules/flock (Depends-on): Likewise. * modules/fsync (Depends-on): Likewise. * modules/isapipe (Depends-on): Likewise. * tests/test-cloexec.c: Include msvc-nothrow.h. * tests/test-dup-safer.c: Likewise. * tests/test-dup2.c: Likewise. * tests/test-dup3.c: Likewise. * tests/test-fcntl.c: Likewise. * tests/test-pipe.c: Likewise. * tests/test-pipe2.c: Likewise. * modules/cloexec-tests (Depends-on): Add msvc-nothrow. * modules/unistd-safer-tests (Depends-on): Likewise. * modules/dup2-tests (Depends-on): Likewise. * modules/dup3-tests (Depends-on): Likewise. * modules/fcntl-tests (Depends-on): Likewise. * modules/pipe-posix-tests (Depends-on): Likewise. * modules/pipe2-tests (Depends-on): Likewise.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* Make sockets.h self-contained.Bruno Haible2009-03-201-2/+8
|
* sockets: Add gl_fd_to_handle.Simon Josefsson2009-02-091-1/+14
|
* Add a comment.Bruno Haible2008-11-121-2/+2
|
* Add module sockets.Simon Josefsson2008-01-241-0/+32