Page MenuHomeFreeBSD

machine/floatingpoing.h: harmonize all arches
AcceptedPublic

Authored by kib on Fri, Oct 2, 7:47 PM.
Tags
None
Referenced Files
F174552165: D60255.id188489.diff
Sun, Oct 4, 2:58 AM
F174532290: D60255.id.diff
Sat, Oct 3, 11:42 PM
Unknown Object (File)
Sat, Oct 3, 6:31 AM
Unknown Object (File)
Sat, Oct 3, 6:30 AM
Unknown Object (File)
Sat, Oct 3, 5:50 AM
Unknown Object (File)
Sat, Oct 3, 3:06 AM
Unknown Object (File)
Sat, Oct 3, 2:33 AM
Unknown Object (File)
Sat, Oct 3, 1:53 AM

Details

Summary
Reported by:    fluffy

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Fri, Oct 2, 7:47 PM
This revision is now accepted and ready to land.Fri, Oct 2, 8:12 PM

So is there some reason this can't be just

/* This file is in the public domain */
#pragma once
#include <sys/_floatingpoint.h>

where sys/_floatingpoint.h is

/* This file is in the public domain */
#pragma once
#include <sys/cdefs.h>
#include <machine/ieeefp.h>
sys/arm/include/floatingpoint.h
33

same comment as the arm64 fp.

sys/arm64/include/floatingpoint.h
19

So this advertising clause suggests that we can just dump this entire license.

This file is now 2 lines of includes that are dictated by externalities. This means we can either just do what I did for a bunch of files and say it's public domain, or just put our own license on this file.

In D60255#1382883, @imp wrote:

So is there some reason this can't be just

/* This file is in the public domain */
#pragma once
#include <sys/_floatingpoint.h>

where sys/_floatingpoint.h is

/* This file is in the public domain */
#pragma once
#include <sys/cdefs.h>
#include <machine/ieeefp.h>

pragma once is not the standard C. Besides my high dislike of avoidable non-standard features, note that the header is public and absolutely must work with non-gcc-like compilers.

Having header file including sys/_floatingpoint.h IMO does not buy us anything. I would understand the argument of moving inclusion of sys/cdefs.h into ieeefp.h but we still need the machine/floatingpoint.h

WRT license, it is strange to have two otherwise identical files under different licenses, but I will get any advise there.