OpenBSD CVS

CVS log for src/sys/sys/endian.h


[BACK] Up to [local] / src / sys / sys

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.25 / (download) - annotate - [select for diffs], Sun Dec 21 04:49:00 2014 UTC (9 years, 5 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, HEAD
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

<sys/endian.h> needs <sys/cdefs.h>

found previously by someone whose email I've lost; rediscovered by miod@
ok millert@ deraadt@

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jul 20 21:41:54 2014 UTC (9 years, 10 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.23: +7 -6 lines
Diff to previous 1.23 (colored)

Provide correct guidance on which header to use in the comments

Revision 1.23 / (download) - annotate - [select for diffs], Sat Jul 12 16:25:08 2014 UTC (9 years, 11 months ago) by guenther
Branch: MAIN
Changes since 1.22: +55 -253 lines
Diff to previous 1.22 (colored)

Tackle the endian.h mess.  Make it so that:
 * you can #include <sys/endian.h> instead of <machine/endian.h>,
   and ditto <endian.h>  (fixes code that pulls in <sys/endian.h> first)

 * those will always export the symbols that POSIX specified for
   <endian.h>, including the new {be,le}{16,32,64}toh() set.  c.f.
	http://austingroupbugs.net/view.php?id=162

   if __BSD_VISIBLE then you also get the symbols that our <machine/endian.h>
   currently exports (ntohs, NTOHS, dlg's bemtoh*, etc)

 * when doing POSIX compiles (not __BSD_VISIBLE), then <netinet/in.h> and
   <arpa/inet.h> will *stop* exporting the extra symbols like BYTE_ORDER
   and betoh*

ok deraadt@

Revision 1.22 / (download) - annotate - [select for diffs], Thu Jul 10 03:16:13 2014 UTC (9 years, 11 months ago) by dlg
Branch: MAIN
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

guenther spotted my bad copy and pasting.

fall back to htobe64 for htobem64 instead of htole64 on LE archs.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Mar 14 10:47:21 2014 UTC (10 years, 3 months ago) by dlg
Branch: MAIN
Changes since 1.20: +71 -3 lines
Diff to previous 1.20 (colored)

provide an MI api for doing byteswapping loads and stores. some
archs have instrutions that can do this, and the rest that dont get
to use wrappers around the byteswap(3) api.

this provides MI backends for sparc64 and powerpc which get a big
benefit from this because byteswapping in registers is really hard
for them.

the intended use case is for reading and writing bits of dma memory
handed to and from hardware.

discussed with miod@ guenther@ deraadt@
ok miod@ kettenis@

Revision 1.20 / (download) - annotate - [select for diffs], Tue Aug 20 12:55:02 2013 UTC (10 years, 9 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored)

Include <sys/_types.h> to make this header a little bit more self-contained.

ok guenther@

Revision 1.19 / (download) - annotate - [select for diffs], Fri Jun 24 22:44:59 2011 UTC (12 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.18: +17 -17 lines
Diff to previous 1.18 (colored)

When converting endian to same-endian, the macros should cast to unsigned
so that signedness of the input is suppressed.
ok matthew miod kettenis guenther

Revision 1.18 / (download) - annotate - [select for diffs], Mon Mar 27 07:09:24 2006 UTC (18 years, 2 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

Kill lint warning by using unsigned right hand arg to >>
Right shifting signed values is undefined. From claudio@
ok millert@; comitted by request of deraadt@

Revision 1.17 / (download) - annotate - [select for diffs], Fri Jan 6 18:53:05 2006 UTC (18 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.16: +37 -37 lines
Diff to previous 1.16 (colored)

Adapt things to use __type_t instead of _BSD_TYPE_T_
Add new sys/_types.h header
Include machine/_types.h or sys/_types.h where applicable

Revision 1.16 / (download) - annotate - [select for diffs], Wed Dec 14 18:28:40 2005 UTC (18 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.15: +7 -7 lines
Diff to previous 1.15 (colored)

Add a __statement macro to use with gcc statement expressions instead
of using __extension__ directly.  This lets us define away the whole
thing when lint is in use.

Revision 1.15 / (download) - annotate - [select for diffs], Tue Dec 13 00:35:23 2005 UTC (18 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.14: +57 -37 lines
Diff to previous 1.14 (colored)

First step in include files overhaul.  Use __FOO_VISIBLE (as defined
in sys/cdefs.h) instead of _FOO_SOURCE.  Also fix several namespace
pollution issues, including the byte order defines.  OK deraadt@

Revision 1.4.4.6 / (download) - annotate - [select for diffs], Thu Feb 19 11:01:32 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.4.4.5: +19 -15 lines
Diff to previous 1.4.4.5 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.14 / (download) - annotate - [select for diffs], Sun Jan 11 19:17:31 2004 UTC (20 years, 5 months ago) by brad
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.13: +15 -15 lines
Diff to previous 1.13 (colored)

mark u_int64_t constants with ULL to make gcc3 happy

ok drahn@ tedu@

Revision 1.13 / (download) - annotate - [select for diffs], Fri Sep 26 17:06:50 2003 UTC (20 years, 8 months ago) by fgsch
Branch: MAIN
Changes since 1.12: +4 -0 lines
Diff to previous 1.12 (colored)

put 64bit macros/functions documentation back.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Sep 21 18:11:26 2003 UTC (20 years, 8 months ago) by fgsch
Branch: MAIN
Changes since 1.11: +1 -5 lines
Diff to previous 1.11 (colored)

revert for now.

Revision 1.11 / (download) - annotate - [select for diffs], Sun Sep 21 10:50:15 2003 UTC (20 years, 8 months ago) by fgsch
Branch: MAIN
Changes since 1.10: +4 -0 lines
Diff to previous 1.10 (colored)

document and declare 64-bit function/macros. ok millert@ deraadt@

Revision 1.4.4.5 / (download) - annotate - [select for diffs], Sat Jun 7 11:09:07 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.4.4.4: +1 -6 lines
Diff to previous 1.4.4.4 (colored) to branchpoint 1.4 (colored)

Sync SMP branch to -current

Revision 1.10 / (download) - annotate - [select for diffs], Tue Jun 3 20:49:29 2003 UTC (21 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.9: +1 -6 lines
Diff to previous 1.9 (colored)

fix various 3/4 licenses according to "terms" file

Revision 1.7.4.2 / (download) - annotate - [select for diffs], Mon May 19 22:32:19 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.7.4.1: +2 -2 lines
Diff to previous 1.7.4.1 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

sync

Revision 1.4.4.4 / (download) - annotate - [select for diffs], Tue May 13 19:36:57 2003 UTC (21 years, 1 month ago) by ho
Branch: SMP
Changes since 1.4.4.3: +2 -2 lines
Diff to previous 1.4.4.3 (colored) to branchpoint 1.4 (colored)

Sync the SMP branch to -current. This includes moving to ELF.

Revision 1.9 / (download) - annotate - [select for diffs], Thu May 1 02:17:28 2003 UTC (21 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: UBC_SYNC_A
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Fix unbalanced parens in __swap64gen macro for non-gcc; Hugh C Kennedy

Revision 1.7.4.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:32:33 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.7: +10 -10 lines
Diff to previous 1.7 (colored)

Sync UBC branch to -current

Revision 1.4.4.3 / (download) - annotate - [select for diffs], Thu Mar 28 14:52:01 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.4.4.2: +10 -10 lines
Diff to previous 1.4.4.2 (colored) to branchpoint 1.4 (colored)

Merge in -current from roughly a week ago

Revision 1.8 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:14 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: UBC_SYNC_B, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.7: +10 -10 lines
Diff to previous 1.7 (colored)

First round of __P removal in sys

Revision 1.4.4.2 / (download) - annotate - [select for diffs], Wed Jul 4 11:00:17 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.4.4.1: +41 -2 lines
Diff to previous 1.4.4.1 (colored) to branchpoint 1.4 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jun 27 01:23:50 2001 UTC (22 years, 11 months ago) by mickey
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0
Branch point for: UBC
Changes since 1.6: +40 -1 lines
Diff to previous 1.6 (colored)

implement md 64 bit swaps; niklas@ ok

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jun 22 14:11:00 2001 UTC (22 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

KNF

Revision 1.4.4.1 / (download) - annotate - [select for diffs], Mon May 14 22:45:01 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.4: +5 -5 lines
Diff to previous 1.4 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.5 / (download) - annotate - [select for diffs], Wed Oct 25 21:43:29 2000 UTC (23 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.4: +5 -5 lines
Diff to previous 1.4 (colored)

mark swap16() and swap32() with __extension__; guenther@gac.edu

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jul 21 05:58:25 1999 UTC (24 years, 10 months ago) by csapuntz
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6
Branch point for: SMP
Changes since 1.3: +12 -1 lines
Diff to previous 1.3 (colored)



swap16_multi by niklas@cvs.openbsd.org

Fix cd.c so it compiles on big-endian platforms

Revision 1.3 / (download) - annotate - [select for diffs], Sun Nov 30 18:50:17 1997 UTC (26 years, 6 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.2: +1 -4 lines
Diff to previous 1.2 (colored)

Move in_addr_t and in_port_t to <sys/types.h> and add sa_family_t
and suseconds_t types for XPG4.2.

Revision 1.2 / (download) - annotate - [select for diffs], Mon Nov 10 10:29:14 1997 UTC (26 years, 7 months ago) by niklas
Branch: MAIN
Changes since 1.1: +37 -14 lines
Diff to previous 1.1 (colored)

Sign extension paranoia.  Careful about local varnames in macros.
Typo correction.  Overrideable _QUAD_{LOW,HIGH}WORD values.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Nov 9 23:04:58 1997 UTC (26 years, 7 months ago) by niklas
Branch: MAIN

New endian.h design.  All architectures now use a common file for the bulk
part.  Some ports can optimize the swap operations.  This also means the
general API is extended with swap16, swap32, htobe16, htobe32, betoh16,
betoh32, htole16, htole32, letoh16 and letoh32.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.